diff options
Diffstat (limited to 'Ryujinx.Common/Configuration')
| -rw-r--r-- | Ryujinx.Common/Configuration/ConfigurationFileFormat.cs | 9 | ||||
| -rw-r--r-- | Ryujinx.Common/Configuration/ConfigurationState.cs | 18 |
2 files changed, 25 insertions, 2 deletions
diff --git a/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs b/Ryujinx.Common/Configuration/ConfigurationFileFormat.cs index 79993d87..901c823e 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 = 20; + public const int CurrentVersion = 22; public int Version { get; set; } @@ -134,6 +134,11 @@ namespace Ryujinx.Configuration public bool ShowConfirmExit { get; set; } /// <summary> + /// Hide Cursor on Idle + /// </summary> + public bool HideCursorOnIdle { get; set; } + + /// <summary> /// Enables or disables Vertical Sync /// </summary> public bool EnableVsync { get; set; } @@ -253,4 +258,4 @@ namespace Ryujinx.Configuration JsonHelper.Serialize(fileStream, this, true); } } -}
\ No newline at end of file +} diff --git a/Ryujinx.Common/Configuration/ConfigurationState.cs b/Ryujinx.Common/Configuration/ConfigurationState.cs index 61cc8f89..d51ee9ef 100644 --- a/Ryujinx.Common/Configuration/ConfigurationState.cs +++ b/Ryujinx.Common/Configuration/ConfigurationState.cs @@ -365,6 +365,11 @@ namespace Ryujinx.Configuration /// </summary> public ReactiveObject<bool> ShowConfirmExit { get; private set; } + /// <summary> + /// Hide Cursor on Idle + /// </summary> + public ReactiveObject<bool> HideCursorOnIdle { get; private set; } + private ConfigurationState() { Ui = new UiSection(); @@ -375,6 +380,7 @@ namespace Ryujinx.Configuration EnableDiscordIntegration = new ReactiveObject<bool>(); CheckUpdatesOnStart = new ReactiveObject<bool>(); ShowConfirmExit = new ReactiveObject<bool>(); + HideCursorOnIdle = new ReactiveObject<bool>(); } public ConfigurationFileFormat ToFileFormat() @@ -420,6 +426,7 @@ namespace Ryujinx.Configuration EnableDiscordIntegration = EnableDiscordIntegration, CheckUpdatesOnStart = CheckUpdatesOnStart, ShowConfirmExit = ShowConfirmExit, + HideCursorOnIdle = HideCursorOnIdle, EnableVsync = Graphics.EnableVsync, EnableShaderCache = Graphics.EnableShaderCache, EnablePtc = System.EnablePtc, @@ -483,6 +490,7 @@ namespace Ryujinx.Configuration EnableDiscordIntegration.Value = true; CheckUpdatesOnStart.Value = true; ShowConfirmExit.Value = true; + HideCursorOnIdle.Value = false; Graphics.EnableVsync.Value = true; Graphics.EnableShaderCache.Value = true; System.EnablePtc.Value = true; @@ -787,6 +795,15 @@ namespace Ryujinx.Configuration configurationFileUpdated = true; } + if (configurationFileFormat.Version < 22) + { + Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 22."); + + configurationFileFormat.HideCursorOnIdle = false; + + configurationFileUpdated = true; + } + List<InputConfig> inputConfig = new List<InputConfig>(); inputConfig.AddRange(configurationFileFormat.ControllerConfig); inputConfig.AddRange(configurationFileFormat.KeyboardConfig); @@ -814,6 +831,7 @@ namespace Ryujinx.Configuration EnableDiscordIntegration.Value = configurationFileFormat.EnableDiscordIntegration; CheckUpdatesOnStart.Value = configurationFileFormat.CheckUpdatesOnStart; ShowConfirmExit.Value = configurationFileFormat.ShowConfirmExit; + HideCursorOnIdle.Value = configurationFileFormat.HideCursorOnIdle; Graphics.EnableVsync.Value = configurationFileFormat.EnableVsync; Graphics.EnableShaderCache.Value = configurationFileFormat.EnableShaderCache; System.EnablePtc.Value = configurationFileFormat.EnablePtc; |
