|
@@ -148,6 +148,11 @@ namespace Ryujinx.Configuration
|
|
|
/// </summary>
|
|
/// </summary>
|
|
|
public ReactiveObject<Language> Language { get; private set; }
|
|
public ReactiveObject<Language> Language { get; private set; }
|
|
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
|
+ /// Change System Region
|
|
|
|
|
+ /// </summary>
|
|
|
|
|
+ public ReactiveObject<Region> Region { get; private set; }
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// Enables or disables Docked Mode
|
|
/// Enables or disables Docked Mode
|
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -176,6 +181,7 @@ namespace Ryujinx.Configuration
|
|
|
public SystemSection()
|
|
public SystemSection()
|
|
|
{
|
|
{
|
|
|
Language = new ReactiveObject<Language>();
|
|
Language = new ReactiveObject<Language>();
|
|
|
|
|
+ Region = new ReactiveObject<Region>();
|
|
|
EnableDockedMode = new ReactiveObject<bool>();
|
|
EnableDockedMode = new ReactiveObject<bool>();
|
|
|
EnableMulticoreScheduling = new ReactiveObject<bool>();
|
|
EnableMulticoreScheduling = new ReactiveObject<bool>();
|
|
|
EnableFsIntegrityChecks = new ReactiveObject<bool>();
|
|
EnableFsIntegrityChecks = new ReactiveObject<bool>();
|
|
@@ -289,7 +295,7 @@ namespace Ryujinx.Configuration
|
|
|
{
|
|
{
|
|
|
ConfigurationFileFormat configurationFile = new ConfigurationFileFormat
|
|
ConfigurationFileFormat configurationFile = new ConfigurationFileFormat
|
|
|
{
|
|
{
|
|
|
- Version = 1,
|
|
|
|
|
|
|
+ Version = 2,
|
|
|
GraphicsShadersDumpPath = Graphics.ShadersDumpPath,
|
|
GraphicsShadersDumpPath = Graphics.ShadersDumpPath,
|
|
|
LoggingEnableDebug = Logger.EnableDebug,
|
|
LoggingEnableDebug = Logger.EnableDebug,
|
|
|
LoggingEnableStub = Logger.EnableStub,
|
|
LoggingEnableStub = Logger.EnableStub,
|
|
@@ -301,6 +307,7 @@ namespace Ryujinx.Configuration
|
|
|
LoggingFilteredClasses = Logger.FilteredClasses,
|
|
LoggingFilteredClasses = Logger.FilteredClasses,
|
|
|
EnableFileLog = Logger.EnableFileLog,
|
|
EnableFileLog = Logger.EnableFileLog,
|
|
|
SystemLanguage = System.Language,
|
|
SystemLanguage = System.Language,
|
|
|
|
|
+ SystemRegion = System.Region,
|
|
|
DockedMode = System.EnableDockedMode,
|
|
DockedMode = System.EnableDockedMode,
|
|
|
EnableDiscordIntegration = EnableDiscordIntegration,
|
|
EnableDiscordIntegration = EnableDiscordIntegration,
|
|
|
EnableVsync = Graphics.EnableVsync,
|
|
EnableVsync = Graphics.EnableVsync,
|
|
@@ -346,6 +353,7 @@ namespace Ryujinx.Configuration
|
|
|
Logger.FilteredClasses.Value = new LogClass[] { };
|
|
Logger.FilteredClasses.Value = new LogClass[] { };
|
|
|
Logger.EnableFileLog.Value = true;
|
|
Logger.EnableFileLog.Value = true;
|
|
|
System.Language.Value = Language.AmericanEnglish;
|
|
System.Language.Value = Language.AmericanEnglish;
|
|
|
|
|
+ System.Region.Value = Region.USA;
|
|
|
System.EnableDockedMode.Value = false;
|
|
System.EnableDockedMode.Value = false;
|
|
|
EnableDiscordIntegration.Value = true;
|
|
EnableDiscordIntegration.Value = true;
|
|
|
Graphics.EnableVsync.Value = true;
|
|
Graphics.EnableVsync.Value = true;
|
|
@@ -440,9 +448,11 @@ namespace Ryujinx.Configuration
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public void Load(ConfigurationFileFormat configurationFileFormat)
|
|
|
|
|
|
|
+ public void Load(ConfigurationFileFormat configurationFileFormat, string configurationFilePath)
|
|
|
{
|
|
{
|
|
|
- if (configurationFileFormat.Version != 1 && configurationFileFormat.Version != 0)
|
|
|
|
|
|
|
+ bool configurationFileUpdated = false;
|
|
|
|
|
+
|
|
|
|
|
+ if (configurationFileFormat.Version < 0 || configurationFileFormat.Version > 2)
|
|
|
{
|
|
{
|
|
|
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Unsupported configuration version {configurationFileFormat.Version}, loading default.");
|
|
Common.Logging.Logger.PrintWarning(LogClass.Application, $"Unsupported configuration version {configurationFileFormat.Version}, loading default.");
|
|
|
|
|
|
|
@@ -451,6 +461,15 @@ namespace Ryujinx.Configuration
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (configurationFileFormat.Version < 2)
|
|
|
|
|
+ {
|
|
|
|
|
+ Common.Logging.Logger.PrintWarning(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, needs to be updated.");
|
|
|
|
|
+
|
|
|
|
|
+ configurationFileFormat.SystemRegion = Region.USA;
|
|
|
|
|
+
|
|
|
|
|
+ configurationFileUpdated = true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
Graphics.ShadersDumpPath.Value = configurationFileFormat.GraphicsShadersDumpPath;
|
|
Graphics.ShadersDumpPath.Value = configurationFileFormat.GraphicsShadersDumpPath;
|
|
|
Logger.EnableDebug.Value = configurationFileFormat.LoggingEnableDebug;
|
|
Logger.EnableDebug.Value = configurationFileFormat.LoggingEnableDebug;
|
|
|
Logger.EnableStub.Value = configurationFileFormat.LoggingEnableStub;
|
|
Logger.EnableStub.Value = configurationFileFormat.LoggingEnableStub;
|
|
@@ -462,6 +481,7 @@ namespace Ryujinx.Configuration
|
|
|
Logger.FilteredClasses.Value = configurationFileFormat.LoggingFilteredClasses;
|
|
Logger.FilteredClasses.Value = configurationFileFormat.LoggingFilteredClasses;
|
|
|
Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog;
|
|
Logger.EnableFileLog.Value = configurationFileFormat.EnableFileLog;
|
|
|
System.Language.Value = configurationFileFormat.SystemLanguage;
|
|
System.Language.Value = configurationFileFormat.SystemLanguage;
|
|
|
|
|
+ System.Region.Value = configurationFileFormat.SystemRegion;
|
|
|
System.EnableDockedMode.Value = configurationFileFormat.DockedMode;
|
|
System.EnableDockedMode.Value = configurationFileFormat.DockedMode;
|
|
|
System.EnableDockedMode.Value = configurationFileFormat.DockedMode;
|
|
System.EnableDockedMode.Value = configurationFileFormat.DockedMode;
|
|
|
EnableDiscordIntegration.Value = configurationFileFormat.EnableDiscordIntegration;
|
|
EnableDiscordIntegration.Value = configurationFileFormat.EnableDiscordIntegration;
|
|
@@ -487,6 +507,13 @@ namespace Ryujinx.Configuration
|
|
|
Hid.EnableKeyboard.Value = configurationFileFormat.EnableKeyboard;
|
|
Hid.EnableKeyboard.Value = configurationFileFormat.EnableKeyboard;
|
|
|
Hid.KeyboardControls.Value = configurationFileFormat.KeyboardControls;
|
|
Hid.KeyboardControls.Value = configurationFileFormat.KeyboardControls;
|
|
|
Hid.JoystickControls.Value = configurationFileFormat.JoystickControls;
|
|
Hid.JoystickControls.Value = configurationFileFormat.JoystickControls;
|
|
|
|
|
+
|
|
|
|
|
+ if (configurationFileUpdated)
|
|
|
|
|
+ {
|
|
|
|
|
+ ToFileFormat().SaveConfig(configurationFilePath);
|
|
|
|
|
+
|
|
|
|
|
+ Common.Logging.Logger.PrintWarning(LogClass.Application, "Configuration file is updated!");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public static void Initialize()
|
|
public static void Initialize()
|