|
@@ -5,6 +5,7 @@ using Ryujinx.Common.Configuration.Hid.Controller;
|
|
|
using Ryujinx.Common.Configuration.Hid.Keyboard;
|
|
using Ryujinx.Common.Configuration.Hid.Keyboard;
|
|
|
using Ryujinx.Common.Configuration.Multiplayer;
|
|
using Ryujinx.Common.Configuration.Multiplayer;
|
|
|
using Ryujinx.Common.Logging;
|
|
using Ryujinx.Common.Logging;
|
|
|
|
|
+using Ryujinx.Graphics.Vulkan;
|
|
|
using Ryujinx.Ui.Common.Configuration.System;
|
|
using Ryujinx.Ui.Common.Configuration.System;
|
|
|
using Ryujinx.Ui.Common.Configuration.Ui;
|
|
using Ryujinx.Ui.Common.Configuration.Ui;
|
|
|
using Ryujinx.Ui.Common.Helper;
|
|
using Ryujinx.Ui.Common.Helper;
|
|
@@ -763,7 +764,7 @@ namespace Ryujinx.Ui.Common.Configuration
|
|
|
Graphics.ResScaleCustom.Value = 1.0f;
|
|
Graphics.ResScaleCustom.Value = 1.0f;
|
|
|
Graphics.MaxAnisotropy.Value = -1.0f;
|
|
Graphics.MaxAnisotropy.Value = -1.0f;
|
|
|
Graphics.AspectRatio.Value = AspectRatio.Fixed16x9;
|
|
Graphics.AspectRatio.Value = AspectRatio.Fixed16x9;
|
|
|
- Graphics.GraphicsBackend.Value = OperatingSystem.IsMacOS() ? GraphicsBackend.Vulkan : GraphicsBackend.OpenGl;
|
|
|
|
|
|
|
+ Graphics.GraphicsBackend.Value = DefaultGraphicsBackend();
|
|
|
Graphics.PreferredGpu.Value = "";
|
|
Graphics.PreferredGpu.Value = "";
|
|
|
Graphics.ShadersDumpPath.Value = "";
|
|
Graphics.ShadersDumpPath.Value = "";
|
|
|
Logger.EnableDebug.Value = false;
|
|
Logger.EnableDebug.Value = false;
|
|
@@ -907,7 +908,7 @@ namespace Ryujinx.Ui.Common.Configuration
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public ConfigurationLoadResult Load(ConfigurationFileFormat configurationFileFormat, string configurationFilePath)
|
|
|
|
|
|
|
+ public void Load(ConfigurationFileFormat configurationFileFormat, string configurationFilePath)
|
|
|
{
|
|
{
|
|
|
bool configurationFileUpdated = false;
|
|
bool configurationFileUpdated = false;
|
|
|
|
|
|
|
@@ -916,12 +917,8 @@ namespace Ryujinx.Ui.Common.Configuration
|
|
|
Ryujinx.Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Unsupported configuration version {configurationFileFormat.Version}, loading default.");
|
|
Ryujinx.Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Unsupported configuration version {configurationFileFormat.Version}, loading default.");
|
|
|
|
|
|
|
|
LoadDefault();
|
|
LoadDefault();
|
|
|
-
|
|
|
|
|
- return ConfigurationLoadResult.NotLoaded;
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- ConfigurationLoadResult result = ConfigurationLoadResult.Success;
|
|
|
|
|
-
|
|
|
|
|
if (configurationFileFormat.Version < 2)
|
|
if (configurationFileFormat.Version < 2)
|
|
|
{
|
|
{
|
|
|
Ryujinx.Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 2.");
|
|
Ryujinx.Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 2.");
|
|
@@ -1336,8 +1333,6 @@ namespace Ryujinx.Ui.Common.Configuration
|
|
|
|
|
|
|
|
configurationFileFormat.GraphicsBackend = GraphicsBackend.OpenGl;
|
|
configurationFileFormat.GraphicsBackend = GraphicsBackend.OpenGl;
|
|
|
|
|
|
|
|
- result |= ConfigurationLoadResult.MigratedFromPreVulkan;
|
|
|
|
|
-
|
|
|
|
|
configurationFileUpdated = true;
|
|
configurationFileUpdated = true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1535,8 +1530,18 @@ namespace Ryujinx.Ui.Common.Configuration
|
|
|
|
|
|
|
|
Ryujinx.Common.Logging.Logger.Notice.Print(LogClass.Application, $"Configuration file updated to version {ConfigurationFileFormat.CurrentVersion}");
|
|
Ryujinx.Common.Logging.Logger.Notice.Print(LogClass.Application, $"Configuration file updated to version {ConfigurationFileFormat.CurrentVersion}");
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private static GraphicsBackend DefaultGraphicsBackend()
|
|
|
|
|
+ {
|
|
|
|
|
+ // Any system running macOS or returning any amount of valid Vulkan devices should default to Vulkan.
|
|
|
|
|
+ // Checks for if the Vulkan version and featureset is compatible should be performed within VulkanRenderer.
|
|
|
|
|
+ if (OperatingSystem.IsMacOS() || VulkanRenderer.GetPhysicalDevices().Length > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ return GraphicsBackend.Vulkan;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- return result;
|
|
|
|
|
|
|
+ return GraphicsBackend.OpenGl;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private static void LogValueChange<T>(ReactiveEventArgs<T> eventArgs, string valueName)
|
|
private static void LogValueChange<T>(ReactiveEventArgs<T> eventArgs, string valueName)
|