From 3a10d79bd99aa6a0bbc65e6aaa4a34e5f9e0fdfe Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Sat, 12 Aug 2023 12:24:47 +0100 Subject: [PATCH] Style fixes --- src/Ryujinx.Ava/UI/Helpers/KeyValueConverter.cs | 12 ++++++------ .../UI/Views/Input/KeyboardInputView.axaml.cs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Ryujinx.Ava/UI/Helpers/KeyValueConverter.cs b/src/Ryujinx.Ava/UI/Helpers/KeyValueConverter.cs index e066da29e..1c4aa7b21 100644 --- a/src/Ryujinx.Ava/UI/Helpers/KeyValueConverter.cs +++ b/src/Ryujinx.Ava/UI/Helpers/KeyValueConverter.cs @@ -12,7 +12,7 @@ namespace Ryujinx.Ava.UI.Helpers { public static KeyValueConverter Instance = new(); - private static readonly Dictionary KeysMap = new() + private static readonly Dictionary _keysMap = new() { { Key.Unknown, LocaleKeys.KeyUnknown }, { Key.ShiftLeft, LocaleKeys.KeyShiftLeft }, @@ -85,7 +85,7 @@ namespace Ryujinx.Ava.UI.Helpers { Key.Unbound, LocaleKeys.KeyUnbound }, }; - private static readonly Dictionary GamepadInputIdMap = new() + private static readonly Dictionary _gamepadInputIdMap = new() { { GamepadInputId.LeftStick, LocaleKeys.GamepadLeftStick }, { GamepadInputId.RightStick, LocaleKeys.GamepadRightStick }, @@ -113,7 +113,7 @@ namespace Ryujinx.Ava.UI.Helpers { GamepadInputId.Unbound, LocaleKeys.KeyUnbound}, }; - private static readonly Dictionary StickInputIdMap = new() + private static readonly Dictionary _stickInputIdMap = new() { { StickInputId.Left, LocaleKeys.StickLeft}, { StickInputId.Right, LocaleKeys.StickRight}, @@ -126,7 +126,7 @@ namespace Ryujinx.Ava.UI.Helpers if (value is Key key) { - if (KeysMap.TryGetValue(key, out LocaleKeys localeKey)) + if (_keysMap.TryGetValue(key, out LocaleKeys localeKey)) { keyString = LocaleManager.Instance[localeKey]; } @@ -137,7 +137,7 @@ namespace Ryujinx.Ava.UI.Helpers } else if (value is GamepadInputId gamepadInputId) { - if (GamepadInputIdMap.TryGetValue(gamepadInputId, out LocaleKeys localeKey)) + if (_gamepadInputIdMap.TryGetValue(gamepadInputId, out LocaleKeys localeKey)) { keyString = LocaleManager.Instance[localeKey]; } @@ -148,7 +148,7 @@ namespace Ryujinx.Ava.UI.Helpers } else if (value is StickInputId stickInputId) { - if (StickInputIdMap.TryGetValue(stickInputId, out LocaleKeys localeKey)) + if (_stickInputIdMap.TryGetValue(stickInputId, out LocaleKeys localeKey)) { keyString = LocaleManager.Instance[localeKey]; } diff --git a/src/Ryujinx.Ava/UI/Views/Input/KeyboardInputView.axaml.cs b/src/Ryujinx.Ava/UI/Views/Input/KeyboardInputView.axaml.cs index 8e5f403c1..13dd59ee4 100644 --- a/src/Ryujinx.Ava/UI/Views/Input/KeyboardInputView.axaml.cs +++ b/src/Ryujinx.Ava/UI/Views/Input/KeyboardInputView.axaml.cs @@ -22,7 +22,7 @@ namespace Ryujinx.Ava.UI.Views.Input foreach (ILogical visual in SettingButtons.GetLogicalDescendants()) { - if (visual is ToggleButton button && !(visual is CheckBox)) + if (visual is ToggleButton button and not CheckBox) { button.IsCheckedChanged += Button_IsCheckedChanged; }