From 55e6e9e9464143a084318077aa6fd9e6da022efd Mon Sep 17 00:00:00 2001 From: ProfOzpin Date: Thu, 7 Mar 2024 19:58:57 +0400 Subject: [PATCH] Resolving failed dotnet whitespace format check --- src/Ryujinx.Gtk3/UI/Windows/SettingsWindow.cs | 6 +----- .../Configuration/ConfigurationFileFormat.cs | 4 ++-- src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs | 6 +++--- src/Ryujinx/UI/ViewModels/SettingsViewModel.cs | 2 +- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/Ryujinx.Gtk3/UI/Windows/SettingsWindow.cs b/src/Ryujinx.Gtk3/UI/Windows/SettingsWindow.cs index bef16049e..cf4783df8 100644 --- a/src/Ryujinx.Gtk3/UI/Windows/SettingsWindow.cs +++ b/src/Ryujinx.Gtk3/UI/Windows/SettingsWindow.cs @@ -56,7 +56,6 @@ namespace Ryujinx.UI.Windows [GUI] RadioButton _hideCursorNever; [GUI] RadioButton _hideCursorOnIdle; [GUI] RadioButton _hideCursorAlways; - [GUI] Entry _cursorHideIdleTime; [GUI] CheckButton _vSyncToggle; [GUI] CheckButton _shaderCacheToggle; [GUI] CheckButton _textureRecompressionToggle; @@ -233,7 +232,6 @@ namespace Ryujinx.UI.Windows switch (ConfigurationState.Instance.HideCursor.Value) { - case HideCursorMode.Never: _hideCursorNever.Click(); break; @@ -243,7 +241,6 @@ namespace Ryujinx.UI.Windows case HideCursorMode.Always: _hideCursorAlways.Click(); break; - } if (ConfigurationState.Instance.Graphics.EnableVsync) @@ -643,7 +640,6 @@ namespace Ryujinx.UI.Windows ConfigurationState.Instance.System.IgnoreMissingServices.Value = _ignoreToggle.Active; ConfigurationState.Instance.Hid.EnableKeyboard.Value = _directKeyboardAccess.Active; ConfigurationState.Instance.Hid.EnableMouse.Value = _directMouseAccess.Active; - ConfigurationState.Instance.CursorHideIdleTime.Value = int.Parse(_cursorHideIdleTime.Text); ConfigurationState.Instance.UI.EnableCustomTheme.Value = _custThemeToggle.Active; ConfigurationState.Instance.System.Language.Value = Enum.Parse(_systemLanguageSelect.ActiveId); ConfigurationState.Instance.System.Region.Value = Enum.Parse(_systemRegionSelect.ActiveId); @@ -848,4 +844,4 @@ namespace Ryujinx.UI.Windows Dispose(); } } -} +} \ No newline at end of file diff --git a/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs b/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs index 1ee1b7661..c54ebb6f0 100644 --- a/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs +++ b/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs @@ -168,9 +168,9 @@ namespace Ryujinx.UI.Common.Configuration public HideCursorMode HideCursor { get; set; } /// - /// Amount of seconds needed by the mouse to be spent idle for cursor to hide. + /// Amount of seconds needed to be spent idle to hide cursor /// - public int CursorHideIdleTime { get; set; } + public int CursorHideIdleTime { get; set; } /// /// Enables or disables Vertical Sync diff --git a/src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs b/src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs index 182f038a9..fd84631db 100644 --- a/src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs +++ b/src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs @@ -634,7 +634,7 @@ namespace Ryujinx.UI.Common.Configuration /// /// Amount of seconds needed by the mouse to be spent idle to hide the cursor. /// - public ReactiveObject CursorHideIdleTime {get; private set; } + public ReactiveObject CursorHideIdleTime { get; private set; } private ConfigurationState() { @@ -1450,7 +1450,7 @@ namespace Ryujinx.UI.Common.Configuration configurationFileUpdated = true; } - if(configurationFileFormat.Version < 50) + if (configurationFileFormat.Version < 50) { Ryujinx.Common.Logging.Logger.Warning?.Print(LogClass.Application, $"Outdated configuration version {configurationFileFormat.Version}, migrating to version 50."); @@ -1545,7 +1545,7 @@ namespace Ryujinx.UI.Common.Configuration Hid.EnableMouse.Value = configurationFileFormat.EnableMouse; Hid.Hotkeys.Value = configurationFileFormat.Hotkeys; Hid.InputConfig.Value = configurationFileFormat.InputConfig; - + if (Hid.InputConfig.Value == null) { Hid.InputConfig.Value = new List(); diff --git a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs index 697d4e075..2ec5ab815 100644 --- a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs @@ -408,7 +408,7 @@ namespace Ryujinx.Ava.UI.ViewModels ShowConfirmExit = config.ShowConfirmExit; HideCursor = (int)config.HideCursor.Value; CursorHideIdleTime = config.CursorHideIdleTime.Value; - + GameDirectories.Clear(); GameDirectories.AddRange(config.UI.GameDirs.Value);