diff options
Diffstat (limited to 'Ryujinx.Common/Configuration')
-rw-r--r-- | Ryujinx.Common/Configuration/ConfigurationFileFormat.cs | 7 | ||||
-rw-r--r-- | Ryujinx.Common/Configuration/ConfigurationState.cs | 18 |
2 files changed, 24 insertions, 1 deletions
diff --git a/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs b/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs index ae3fa493..cab38046 100644 --- a/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs +++ b/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs @@ -14,7 +14,7 @@ namespace Ryujinx.Configuration /// <summary> /// The current version of the file format /// </summary> - public const int CurrentVersion = 12; + public const int CurrentVersion = 14; public int Version { get; set; } @@ -119,6 +119,11 @@ namespace Ryujinx.Configuration public bool EnableDiscordIntegration { get; set; } /// <summary> + /// Checks for updates when Ryujinx starts when enabled + /// </summary> + public bool CheckUpdatesOnStart { get; set; } + + /// <summary> /// Enables or disables Vertical Sync /// </summary> public bool EnableVsync { get; set; } diff --git a/Ryujinx.Common/Configuration/ConfigurationState.cs b/Ryujinx.Common/Configuration/ConfigurationState.cs index 7f79dd6e..df07019d 100644 --- a/Ryujinx.Common/Configuration/ConfigurationState.cs +++ b/Ryujinx.Common/Configuration/ConfigurationState.cs @@ -343,6 +343,11 @@ namespace Ryujinx.Configuration /// </summary> public ReactiveObject<bool> EnableDiscordIntegration { get; private set; } + /// <summary> + /// Checks for updates when Ryujinx starts when enabled + /// </summary> + public ReactiveObject<bool> CheckUpdatesOnStart { get; private set; } + private ConfigurationState() { Ui = new UiSection(); @@ -351,6 +356,7 @@ namespace Ryujinx.Configuration Graphics = new GraphicsSection(); Hid = new HidSection(); EnableDiscordIntegration = new ReactiveObject<bool>(); + CheckUpdatesOnStart = new ReactiveObject<bool>(); } public ConfigurationFileFormat ToFileFormat() @@ -393,6 +399,7 @@ namespace Ryujinx.Configuration SystemTimeOffset = System.SystemTimeOffset, DockedMode = System.EnableDockedMode, EnableDiscordIntegration = EnableDiscordIntegration, + CheckUpdatesOnStart = CheckUpdatesOnStart, EnableVsync = Graphics.EnableVsync, EnableMulticoreScheduling = System.EnableMulticoreScheduling, EnablePtc = System.EnablePtc, @@ -452,6 +459,7 @@ namespace Ryujinx.Configuration System.SystemTimeOffset.Value = 0; System.EnableDockedMode.Value = false; EnableDiscordIntegration.Value = true; + CheckUpdatesOnStart.Value = true; Graphics.EnableVsync.Value = true; System.EnableMulticoreScheduling.Value = true; System.EnablePtc.Value = false; @@ -696,6 +704,15 @@ namespace Ryujinx.Configuration configurationFileUpdated = true; } + if (configurationFileFormat.Version < 14) + { + Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 14."); + + configurationFileFormat.CheckUpdatesOnStart = true; + + configurationFileUpdated = true; + } + List<InputConfig> inputConfig = new List<InputConfig>(); inputConfig.AddRange(configurationFileFormat.ControllerConfig); inputConfig.AddRange(configurationFileFormat.KeyboardConfig); @@ -720,6 +737,7 @@ namespace Ryujinx.Configuration System.SystemTimeOffset.Value = configurationFileFormat.SystemTimeOffset; System.EnableDockedMode.Value = configurationFileFormat.DockedMode; EnableDiscordIntegration.Value = configurationFileFormat.EnableDiscordIntegration; + CheckUpdatesOnStart.Value = configurationFileFormat.CheckUpdatesOnStart; Graphics.EnableVsync.Value = configurationFileFormat.EnableVsync; System.EnableMulticoreScheduling.Value = configurationFileFormat.EnableMulticoreScheduling; System.EnablePtc.Value = configurationFileFormat.EnablePtc; |