diff options
| author | TSRBerry <20988865+TSRBerry@users.noreply.github.com> | 2023-06-28 18:41:38 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-28 18:41:38 +0200 |
| commit | fc20d9b925b83532a19467293a7cdcbaa4ef3d6b (patch) | |
| tree | ebe0e690b6644d0f825ee80f20e4067855f35cf4 /src/Ryujinx.Common/Configuration | |
| parent | 0a75b73fa43ddadf561ddeb0f923c6f3811c025b (diff) | |
[Ryujinx.Common] Address dotnet-format issues (#5358)
* dotnet format style --severity info
Some changes were manually reverted.
* dotnet format analyzers --serverity info
Some changes have been minimally adapted.
* Restore a few unused methods and variables
* Silence dotnet format IDE0060 warnings
* Silence dotnet format IDE0059 warnings
* Address or silence dotnet format IDE1006 warnings
* Address dotnet format CA1816 warnings
* Address or silence dotnet format CA2211 warnings
* Silence CA1806 and CA1834 issues
* Fix formatting for switch expressions
* Address most dotnet format whitespace warnings
* Apply dotnet format whitespace formatting
A few of them have been manually reverted and the corresponding warning was silenced
* Revert formatting changes for while and for-loops
* Format if-blocks correctly
* Run dotnet format whitespace after rebase
* Run dotnet format style after rebase
* Run dotnet format analyzers after rebase
* Run dotnet format after rebase and remove unused usings
- analyzers
- style
- whitespace
* Add comments to disabled warnings
* Remove a few unused parameters
* Replace MmeShadowScratch with Array256<uint>
* Simplify properties and array initialization, Use const when possible, Remove trailing commas
* Run dotnet format after rebase
* Address IDE0251 warnings
* Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas"
This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e.
* dotnet format whitespace after rebase
* First dotnet format pass
* Second dotnet format pass
* Fix build issues
* Fix StructArrayHelpers.cs
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Fix return statements
* Fix naming rule violations
* Update src/Ryujinx.Common/Utilities/StreamUtils.cs
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Add trailing commas
* Address review feedback
* Address review feedback
* Rename remaining type parameters to TKey and TValue
* Fix manual formatting for logging levels
* Fix spacing before comments
---------
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Diffstat (limited to 'src/Ryujinx.Common/Configuration')
28 files changed, 110 insertions, 104 deletions
diff --git a/src/Ryujinx.Common/Configuration/AntiAliasing.cs b/src/Ryujinx.Common/Configuration/AntiAliasing.cs index 159108ae..9ab0458c 100644 --- a/src/Ryujinx.Common/Configuration/AntiAliasing.cs +++ b/src/Ryujinx.Common/Configuration/AntiAliasing.cs @@ -11,6 +11,6 @@ namespace Ryujinx.Common.Configuration SmaaLow, SmaaMedium, SmaaHigh, - SmaaUltra + SmaaUltra, } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/AppDataManager.cs b/src/Ryujinx.Common/Configuration/AppDataManager.cs index b685e706..1dbc1f0c 100644 --- a/src/Ryujinx.Common/Configuration/AppDataManager.cs +++ b/src/Ryujinx.Common/Configuration/AppDataManager.cs @@ -18,7 +18,7 @@ namespace Ryujinx.Common.Configuration { UserProfile, Portable, - Custom + Custom, } public static LaunchMode Mode { get; private set; } @@ -34,7 +34,7 @@ namespace Ryujinx.Common.Configuration private const string DefaultModsDir = "mods"; public static string CustomModsPath { get; set; } - public static string CustomSdModsPath {get; set; } + public static string CustomSdModsPath { get; set; } public static string CustomNandPath { get; set; } // TODO: Actually implement this into VFS public static string CustomSdCardPath { get; set; } // TODO: Actually implement this into VFS @@ -151,7 +151,7 @@ namespace Ryujinx.Common.Configuration } } - public static string GetModsPath() => CustomModsPath ?? Directory.CreateDirectory(Path.Combine(BaseDirPath, DefaultModsDir)).FullName; + public static string GetModsPath() => CustomModsPath ?? Directory.CreateDirectory(Path.Combine(BaseDirPath, DefaultModsDir)).FullName; public static string GetSdModsPath() => CustomSdModsPath ?? Directory.CreateDirectory(Path.Combine(BaseDirPath, DefaultSdcardDir, "atmosphere")).FullName; } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/AspectRatioExtensions.cs b/src/Ryujinx.Common/Configuration/AspectRatioExtensions.cs index 5e97ed19..c9bf2465 100644 --- a/src/Ryujinx.Common/Configuration/AspectRatioExtensions.cs +++ b/src/Ryujinx.Common/Configuration/AspectRatioExtensions.cs @@ -11,7 +11,7 @@ namespace Ryujinx.Common.Configuration Fixed16x10, Fixed21x9, Fixed32x9, - Stretched + Stretched, } public static class AspectRatioExtensions @@ -25,12 +25,14 @@ namespace Ryujinx.Common.Configuration { return aspectRatio switch { +#pragma warning disable IDE0055 // Disable formatting AspectRatio.Fixed4x3 => 4.0f, AspectRatio.Fixed16x9 => 16.0f, AspectRatio.Fixed16x10 => 16.0f, AspectRatio.Fixed21x9 => 21.0f, AspectRatio.Fixed32x9 => 32.0f, - _ => 16.0f + _ => 16.0f, +#pragma warning restore IDE0055 }; } @@ -38,12 +40,14 @@ namespace Ryujinx.Common.Configuration { return aspectRatio switch { +#pragma warning disable IDE0055 // Disable formatting AspectRatio.Fixed4x3 => 3.0f, AspectRatio.Fixed16x9 => 9.0f, AspectRatio.Fixed16x10 => 10.0f, AspectRatio.Fixed21x9 => 9.0f, AspectRatio.Fixed32x9 => 9.0f, - _ => 9.0f + _ => 9.0f, +#pragma warning restore IDE0055 }; } @@ -51,13 +55,15 @@ namespace Ryujinx.Common.Configuration { return aspectRatio switch { +#pragma warning disable IDE0055 // Disable formatting AspectRatio.Fixed4x3 => "4:3", AspectRatio.Fixed16x9 => "16:9", AspectRatio.Fixed16x10 => "16:10", AspectRatio.Fixed21x9 => "21:9", AspectRatio.Fixed32x9 => "32:9", - _ => "Stretched" + _ => "Stretched", +#pragma warning restore IDE0055 }; } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/DownloadableContentContainer.cs b/src/Ryujinx.Common/Configuration/DownloadableContentContainer.cs index b6ae2f3f..f9e68a3c 100644 --- a/src/Ryujinx.Common/Configuration/DownloadableContentContainer.cs +++ b/src/Ryujinx.Common/Configuration/DownloadableContentContainer.cs @@ -10,4 +10,4 @@ namespace Ryujinx.Common.Configuration [JsonPropertyName("dlc_nca_list")] public List<DownloadableContentNca> DownloadableContentNcaList { get; set; } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/DownloadableContentJsonSerializerContext.cs b/src/Ryujinx.Common/Configuration/DownloadableContentJsonSerializerContext.cs index 132c45a4..0dbc0a30 100644 --- a/src/Ryujinx.Common/Configuration/DownloadableContentJsonSerializerContext.cs +++ b/src/Ryujinx.Common/Configuration/DownloadableContentJsonSerializerContext.cs @@ -8,4 +8,4 @@ namespace Ryujinx.Common.Configuration public partial class DownloadableContentJsonSerializerContext : JsonSerializerContext { } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/DownloadableContentNca.cs b/src/Ryujinx.Common/Configuration/DownloadableContentNca.cs index 80b67300..dded719c 100644 --- a/src/Ryujinx.Common/Configuration/DownloadableContentNca.cs +++ b/src/Ryujinx.Common/Configuration/DownloadableContentNca.cs @@ -7,8 +7,8 @@ namespace Ryujinx.Common.Configuration [JsonPropertyName("path")] public string FullPath { get; set; } [JsonPropertyName("title_id")] - public ulong TitleId { get; set; } + public ulong TitleId { get; set; } [JsonPropertyName("is_enabled")] - public bool Enabled { get; set; } + public bool Enabled { get; set; } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/Hid/Controller/GamepadInputId.cs b/src/Ryujinx.Common/Configuration/Hid/Controller/GamepadInputId.cs index ad1fa667..78bc46f2 100644 --- a/src/Ryujinx.Common/Configuration/Hid/Controller/GamepadInputId.cs +++ b/src/Ryujinx.Common/Configuration/Hid/Controller/GamepadInputId.cs @@ -53,6 +53,6 @@ namespace Ryujinx.Common.Configuration.Hid.Controller SingleLeftTrigger1, SingleRightTrigger1, - Count + Count, } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/Hid/Controller/GenericControllerInputConfig.cs b/src/Ryujinx.Common/Configuration/Hid/Controller/GenericControllerInputConfig.cs index d7f0e788..abc245bc 100644 --- a/src/Ryujinx.Common/Configuration/Hid/Controller/GenericControllerInputConfig.cs +++ b/src/Ryujinx.Common/Configuration/Hid/Controller/GenericControllerInputConfig.cs @@ -4,7 +4,7 @@ using System.Text.Json.Serialization; namespace Ryujinx.Common.Configuration.Hid.Controller { - public class GenericControllerInputConfig<Button, Stick> : GenericInputConfigurationCommon<Button> where Button : unmanaged where Stick : unmanaged + public class GenericControllerInputConfig<TButton, TStick> : GenericInputConfigurationCommon<TButton> where TButton : unmanaged where TStick : unmanaged { [JsonIgnore] private float _deadzoneLeft; @@ -16,12 +16,12 @@ namespace Ryujinx.Common.Configuration.Hid.Controller /// <summary> /// Left JoyCon Controller Stick Bindings /// </summary> - public JoyconConfigControllerStick<Button, Stick> LeftJoyconStick { get; set; } + public JoyconConfigControllerStick<TButton, TStick> LeftJoyconStick { get; set; } /// <summary> /// Right JoyCon Controller Stick Bindings /// </summary> - public JoyconConfigControllerStick<Button, Stick> RightJoyconStick { get; set; } + public JoyconConfigControllerStick<TButton, TStick> RightJoyconStick { get; set; } /// <summary> /// Controller Left Analog Stick Deadzone diff --git a/src/Ryujinx.Common/Configuration/Hid/Controller/JoyconConfigControllerStick.cs b/src/Ryujinx.Common/Configuration/Hid/Controller/JoyconConfigControllerStick.cs index 869cff4f..aaa3ef1d 100644 --- a/src/Ryujinx.Common/Configuration/Hid/Controller/JoyconConfigControllerStick.cs +++ b/src/Ryujinx.Common/Configuration/Hid/Controller/JoyconConfigControllerStick.cs @@ -1,11 +1,11 @@ namespace Ryujinx.Common.Configuration.Hid.Controller { - public class JoyconConfigControllerStick<Button, Stick> where Button: unmanaged where Stick: unmanaged + public class JoyconConfigControllerStick<TButton, TStick> where TButton : unmanaged where TStick : unmanaged { - public Stick Joystick { get; set; } + public TStick Joystick { get; set; } public bool InvertStickX { get; set; } public bool InvertStickY { get; set; } public bool Rotate90CW { get; set; } - public Button StickButton { get; set; } + public TButton StickButton { get; set; } } } diff --git a/src/Ryujinx.Common/Configuration/Hid/Controller/Motion/JsonMotionConfigControllerConverter.cs b/src/Ryujinx.Common/Configuration/Hid/Controller/Motion/JsonMotionConfigControllerConverter.cs index 2b9e0af4..61353371 100644 --- a/src/Ryujinx.Common/Configuration/Hid/Controller/Motion/JsonMotionConfigControllerConverter.cs +++ b/src/Ryujinx.Common/Configuration/Hid/Controller/Motion/JsonMotionConfigControllerConverter.cs @@ -7,7 +7,7 @@ namespace Ryujinx.Common.Configuration.Hid.Controller.Motion { class JsonMotionConfigControllerConverter : JsonConverter<MotionConfigController> { - private static readonly MotionConfigJsonSerializerContext SerializerContext = new(JsonHelper.GetDefaultSerializerOptions()); + private static readonly MotionConfigJsonSerializerContext _serializerContext = new(JsonHelper.GetDefaultSerializerOptions()); private static MotionInputBackendType GetMotionInputBackendType(ref Utf8JsonReader reader) { @@ -55,8 +55,8 @@ namespace Ryujinx.Common.Configuration.Hid.Controller.Motion return motionBackendType switch { - MotionInputBackendType.GamepadDriver => JsonSerializer.Deserialize(ref reader, SerializerContext.StandardMotionConfigController), - MotionInputBackendType.CemuHook => JsonSerializer.Deserialize(ref reader, SerializerContext.CemuHookMotionConfigController), + MotionInputBackendType.GamepadDriver => JsonSerializer.Deserialize(ref reader, _serializerContext.StandardMotionConfigController), + MotionInputBackendType.CemuHook => JsonSerializer.Deserialize(ref reader, _serializerContext.CemuHookMotionConfigController), _ => throw new InvalidOperationException($"Unknown backend type {motionBackendType}"), }; } @@ -66,10 +66,10 @@ namespace Ryujinx.Common.Configuration.Hid.Controller.Motion switch (value.MotionBackend) { case MotionInputBackendType.GamepadDriver: - JsonSerializer.Serialize(writer, value as StandardMotionConfigController, SerializerContext.StandardMotionConfigController); + JsonSerializer.Serialize(writer, value as StandardMotionConfigController, _serializerContext.StandardMotionConfigController); break; case MotionInputBackendType.CemuHook: - JsonSerializer.Serialize(writer, value as CemuHookMotionConfigController, SerializerContext.CemuHookMotionConfigController); + JsonSerializer.Serialize(writer, value as CemuHookMotionConfigController, _serializerContext.CemuHookMotionConfigController); break; default: throw new ArgumentException($"Unknown motion backend type {value.MotionBackend}"); diff --git a/src/Ryujinx.Common/Configuration/Hid/Controller/Motion/MotionConfigJsonSerializerContext.cs b/src/Ryujinx.Common/Configuration/Hid/Controller/Motion/MotionConfigJsonSerializerContext.cs index 5cd9e452..f9d154ff 100644 --- a/src/Ryujinx.Common/Configuration/Hid/Controller/Motion/MotionConfigJsonSerializerContext.cs +++ b/src/Ryujinx.Common/Configuration/Hid/Controller/Motion/MotionConfigJsonSerializerContext.cs @@ -9,4 +9,4 @@ namespace Ryujinx.Common.Configuration.Hid.Controller.Motion public partial class MotionConfigJsonSerializerContext : JsonSerializerContext { } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/Hid/Controller/StickInputId.cs b/src/Ryujinx.Common/Configuration/Hid/Controller/StickInputId.cs index 5fc4d1c8..cbe63e57 100644 --- a/src/Ryujinx.Common/Configuration/Hid/Controller/StickInputId.cs +++ b/src/Ryujinx.Common/Configuration/Hid/Controller/StickInputId.cs @@ -10,6 +10,6 @@ namespace Ryujinx.Common.Configuration.Hid.Controller Left, Right, - Count + Count, } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/Hid/ControllerType.cs b/src/Ryujinx.Common/Configuration/Hid/ControllerType.cs index 1c273537..cf61b79f 100644 --- a/src/Ryujinx.Common/Configuration/Hid/ControllerType.cs +++ b/src/Ryujinx.Common/Configuration/Hid/ControllerType.cs @@ -10,14 +10,14 @@ namespace Ryujinx.Common.Configuration.Hid public enum ControllerType { None, - ProController = 1 << 0, - Handheld = 1 << 1, - JoyconPair = 1 << 2, - JoyconLeft = 1 << 3, - JoyconRight = 1 << 4, - Invalid = 1 << 5, - Pokeball = 1 << 6, + ProController = 1 << 0, + Handheld = 1 << 1, + JoyconPair = 1 << 2, + JoyconLeft = 1 << 3, + JoyconRight = 1 << 4, + Invalid = 1 << 5, + Pokeball = 1 << 6, SystemExternal = 1 << 29, - System = 1 << 30 + System = 1 << 30, } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/Hid/GenericInputConfigurationCommon.cs b/src/Ryujinx.Common/Configuration/Hid/GenericInputConfigurationCommon.cs index 3d43817e..618e20b5 100644 --- a/src/Ryujinx.Common/Configuration/Hid/GenericInputConfigurationCommon.cs +++ b/src/Ryujinx.Common/Configuration/Hid/GenericInputConfigurationCommon.cs @@ -1,15 +1,15 @@ namespace Ryujinx.Common.Configuration.Hid { - public class GenericInputConfigurationCommon<Button> : InputConfig where Button : unmanaged + public class GenericInputConfigurationCommon<TButton> : InputConfig where TButton : unmanaged { /// <summary> /// Left JoyCon Controller Bindings /// </summary> - public LeftJoyconCommonConfig<Button> LeftJoycon { get; set; } + public LeftJoyconCommonConfig<TButton> LeftJoycon { get; set; } /// <summary> /// Right JoyCon Controller Bindings /// </summary> - public RightJoyconCommonConfig<Button> RightJoycon { get; set; } + public RightJoyconCommonConfig<TButton> RightJoycon { get; set; } } } diff --git a/src/Ryujinx.Common/Configuration/Hid/InputConfig.cs b/src/Ryujinx.Common/Configuration/Hid/InputConfig.cs index 16c8f8e3..16a1042e 100644 --- a/src/Ryujinx.Common/Configuration/Hid/InputConfig.cs +++ b/src/Ryujinx.Common/Configuration/Hid/InputConfig.cs @@ -30,7 +30,7 @@ namespace Ryujinx.Common.Configuration.Hid /// Player's Index for the controller /// </summary> public PlayerIndex PlayerIndex { get; set; } - + public event PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) @@ -38,4 +38,4 @@ namespace Ryujinx.Common.Configuration.Hid PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/Hid/InputConfigJsonSerializerContext.cs b/src/Ryujinx.Common/Configuration/Hid/InputConfigJsonSerializerContext.cs index 254c4feb..30138049 100644 --- a/src/Ryujinx.Common/Configuration/Hid/InputConfigJsonSerializerContext.cs +++ b/src/Ryujinx.Common/Configuration/Hid/InputConfigJsonSerializerContext.cs @@ -11,4 +11,4 @@ namespace Ryujinx.Common.Configuration.Hid public partial class InputConfigJsonSerializerContext : JsonSerializerContext { } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/Hid/JsonInputConfigConverter.cs b/src/Ryujinx.Common/Configuration/Hid/JsonInputConfigConverter.cs index 08bbcbf1..81b0d932 100644 --- a/src/Ryujinx.Common/Configuration/Hid/JsonInputConfigConverter.cs +++ b/src/Ryujinx.Common/Configuration/Hid/JsonInputConfigConverter.cs @@ -9,7 +9,7 @@ namespace Ryujinx.Common.Configuration.Hid { public class JsonInputConfigConverter : JsonConverter<InputConfig> { - private static readonly InputConfigJsonSerializerContext SerializerContext = new(JsonHelper.GetDefaultSerializerOptions()); + private static readonly InputConfigJsonSerializerContext _serializerContext = new(JsonHelper.GetDefaultSerializerOptions()); private static InputBackendType GetInputBackendType(ref Utf8JsonReader reader) { @@ -57,8 +57,8 @@ namespace Ryujinx.Common.Configuration.Hid return backendType switch { - InputBackendType.WindowKeyboard => JsonSerializer.Deserialize(ref reader, SerializerContext.StandardKeyboardInputConfig), - InputBackendType.GamepadSDL2 => JsonSerializer.Deserialize(ref reader, SerializerContext.StandardControllerInputConfig), + InputBackendType.WindowKeyboard => JsonSerializer.Deserialize(ref reader, _serializerContext.StandardKeyboardInputConfig), + InputBackendType.GamepadSDL2 => JsonSerializer.Deserialize(ref reader, _serializerContext.StandardControllerInputConfig), _ => throw new InvalidOperationException($"Unknown backend type {backendType}"), }; } @@ -68,10 +68,10 @@ namespace Ryujinx.Common.Configuration.Hid switch (value.Backend) { case InputBackendType.WindowKeyboard: - JsonSerializer.Serialize(writer, value as StandardKeyboardInputConfig, SerializerContext.StandardKeyboardInputConfig); + JsonSerializer.Serialize(writer, value as StandardKeyboardInputConfig, _serializerContext.StandardKeyboardInputConfig); break; case InputBackendType.GamepadSDL2: - JsonSerializer.Serialize(writer, value as StandardControllerInputConfig, SerializerContext.StandardControllerInputConfig); + JsonSerializer.Serialize(writer, value as StandardControllerInputConfig, _serializerContext.StandardControllerInputConfig); break; default: throw new ArgumentException($"Unknown backend type {value.Backend}"); diff --git a/src/Ryujinx.Common/Configuration/Hid/Key.cs b/src/Ryujinx.Common/Configuration/Hid/Key.cs index 3501b8ae..a82a9959 100644 --- a/src/Ryujinx.Common/Configuration/Hid/Key.cs +++ b/src/Ryujinx.Common/Configuration/Hid/Key.cs @@ -138,6 +138,6 @@ namespace Ryujinx.Common.Configuration.Hid BackSlash, Unbound, - Count + Count, } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/Hid/Keyboard/GenericKeyboardInputConfig.cs b/src/Ryujinx.Common/Configuration/Hid/Keyboard/GenericKeyboardInputConfig.cs index b6c82c93..37819a26 100644 --- a/src/Ryujinx.Common/Configuration/Hid/Keyboard/GenericKeyboardInputConfig.cs +++ b/src/Ryujinx.Common/Configuration/Hid/Keyboard/GenericKeyboardInputConfig.cs @@ -1,15 +1,15 @@ namespace Ryujinx.Common.Configuration.Hid.Keyboard { - public class GenericKeyboardInputConfig<Key> : GenericInputConfigurationCommon<Key> where Key : unmanaged + public class GenericKeyboardInputConfig<TKey> : GenericInputConfigurationCommon<TKey> where TKey : unmanaged { /// <summary> /// Left JoyCon Controller Stick Bindings /// </summary> - public JoyconConfigKeyboardStick<Key> LeftJoyconStick { get; set; } + public JoyconConfigKeyboardStick<TKey> LeftJoyconStick { get; set; } /// <summary> /// Right JoyCon Controller Stick Bindings /// </summary> - public JoyconConfigKeyboardStick<Key> RightJoyconStick { get; set; } + public JoyconConfigKeyboardStick<TKey> RightJoyconStick { get; set; } } } diff --git a/src/Ryujinx.Common/Configuration/Hid/Keyboard/JoyconConfigKeyboardStick.cs b/src/Ryujinx.Common/Configuration/Hid/Keyboard/JoyconConfigKeyboardStick.cs index cadc17e8..e0bdefc5 100644 --- a/src/Ryujinx.Common/Configuration/Hid/Keyboard/JoyconConfigKeyboardStick.cs +++ b/src/Ryujinx.Common/Configuration/Hid/Keyboard/JoyconConfigKeyboardStick.cs @@ -1,11 +1,11 @@ namespace Ryujinx.Common.Configuration.Hid.Keyboard { - public class JoyconConfigKeyboardStick<Key> where Key: unmanaged + public class JoyconConfigKeyboardStick<TKey> where TKey : unmanaged { - public Key StickUp { get; set; } - public Key StickDown { get; set; } - public Key StickLeft { get; set; } - public Key StickRight { get; set; } - public Key StickButton { get; set; } + public TKey StickUp { get; set; } + public TKey StickDown { get; set; } + public TKey StickLeft { get; set; } + public TKey StickRight { get; set; } + public TKey StickButton { get; set; } } } diff --git a/src/Ryujinx.Common/Configuration/Hid/KeyboardHotkeys.cs b/src/Ryujinx.Common/Configuration/Hid/KeyboardHotkeys.cs index 1a10c2a5..f0707c73 100644 --- a/src/Ryujinx.Common/Configuration/Hid/KeyboardHotkeys.cs +++ b/src/Ryujinx.Common/Configuration/Hid/KeyboardHotkeys.cs @@ -14,4 +14,4 @@ public Key VolumeUp { get; set; } public Key VolumeDown { get; set; } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/Hid/LeftJoyconCommonConfig.cs b/src/Ryujinx.Common/Configuration/Hid/LeftJoyconCommonConfig.cs index a57240c4..4ae89072 100644 --- a/src/Ryujinx.Common/Configuration/Hid/LeftJoyconCommonConfig.cs +++ b/src/Ryujinx.Common/Configuration/Hid/LeftJoyconCommonConfig.cs @@ -1,15 +1,15 @@ namespace Ryujinx.Common.Configuration.Hid { - public class LeftJoyconCommonConfig<Button> + public class LeftJoyconCommonConfig<TButton> { - public Button ButtonMinus { get; set; } - public Button ButtonL { get; set; } - public Button ButtonZl { get; set; } - public Button ButtonSl { get; set; } - public Button ButtonSr { get; set; } - public Button DpadUp { get; set; } - public Button DpadDown { get; set; } - public Button DpadLeft { get; set; } - public Button DpadRight { get; set; } + public TButton ButtonMinus { get; set; } + public TButton ButtonL { get; set; } + public TButton ButtonZl { get; set; } + public TButton ButtonSl { get; set; } + public TButton ButtonSr { get; set; } + public TButton DpadUp { get; set; } + public TButton DpadDown { get; set; } + public TButton DpadLeft { get; set; } + public TButton DpadRight { get; set; } } } diff --git a/src/Ryujinx.Common/Configuration/Hid/PlayerIndex.cs b/src/Ryujinx.Common/Configuration/Hid/PlayerIndex.cs index 4e9a0434..05e8f3fa 100644 --- a/src/Ryujinx.Common/Configuration/Hid/PlayerIndex.cs +++ b/src/Ryujinx.Common/Configuration/Hid/PlayerIndex.cs @@ -7,16 +7,16 @@ namespace Ryujinx.Common.Configuration.Hid [JsonConverter(typeof(TypedStringEnumConverter<PlayerIndex>))] public enum PlayerIndex { - Player1 = 0, - Player2 = 1, - Player3 = 2, - Player4 = 3, - Player5 = 4, - Player6 = 5, - Player7 = 6, - Player8 = 7, + Player1 = 0, + Player2 = 1, + Player3 = 2, + Player4 = 3, + Player5 = 4, + Player6 = 5, + Player7 = 6, + Player8 = 7, Handheld = 8, - Unknown = 9, - Auto = 10 // Shouldn't be used directly + Unknown = 9, + Auto = 10, // Shouldn't be used directly } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/Hid/RightJoyconCommonConfig.cs b/src/Ryujinx.Common/Configuration/Hid/RightJoyconCommonConfig.cs index ca2d0176..e121b9a5 100644 --- a/src/Ryujinx.Common/Configuration/Hid/RightJoyconCommonConfig.cs +++ b/src/Ryujinx.Common/Configuration/Hid/RightJoyconCommonConfig.cs @@ -1,15 +1,15 @@ namespace Ryujinx.Common.Configuration.Hid { - public class RightJoyconCommonConfig<Button> + public class RightJoyconCommonConfig<TButton> { - public Button ButtonPlus { get; set; } - public Button ButtonR { get; set; } - public Button ButtonZr { get; set; } - public Button ButtonSl { get; set; } - public Button ButtonSr { get; set; } - public Button ButtonX { get; set; } - public Button ButtonB { get; set; } - public Button ButtonY { get; set; } - public Button ButtonA { get; set; } + public TButton ButtonPlus { get; set; } + public TButton ButtonR { get; set; } + public TButton ButtonZr { get; set; } + public TButton ButtonSl { get; set; } + public TButton ButtonSr { get; set; } + public TButton ButtonX { get; set; } + public TButton ButtonB { get; set; } + public TButton ButtonY { get; set; } + public TButton ButtonA { get; set; } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/HideCursorMode.cs b/src/Ryujinx.Common/Configuration/HideCursorMode.cs index 895fc107..f4480268 100644 --- a/src/Ryujinx.Common/Configuration/HideCursorMode.cs +++ b/src/Ryujinx.Common/Configuration/HideCursorMode.cs @@ -4,6 +4,6 @@ namespace Ryujinx.Common.Configuration { Never, OnIdle, - Always + Always, } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/ScalingFilter.cs b/src/Ryujinx.Common/Configuration/ScalingFilter.cs index e38c7d73..1c6a74b3 100644 --- a/src/Ryujinx.Common/Configuration/ScalingFilter.cs +++ b/src/Ryujinx.Common/Configuration/ScalingFilter.cs @@ -8,6 +8,6 @@ namespace Ryujinx.Common.Configuration { Bilinear, Nearest, - Fsr + Fsr, } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/TitleUpdateMetadata.cs b/src/Ryujinx.Common/Configuration/TitleUpdateMetadata.cs index ea208e9c..17a13bf1 100644 --- a/src/Ryujinx.Common/Configuration/TitleUpdateMetadata.cs +++ b/src/Ryujinx.Common/Configuration/TitleUpdateMetadata.cs @@ -4,7 +4,7 @@ namespace Ryujinx.Common.Configuration { public struct TitleUpdateMetadata { - public string Selected { get; set; } - public List<string> Paths { get; set; } + public string Selected { get; set; } + public List<string> Paths { get; set; } } -}
\ No newline at end of file +} diff --git a/src/Ryujinx.Common/Configuration/TitleUpdateMetadataJsonSerializerContext.cs b/src/Ryujinx.Common/Configuration/TitleUpdateMetadataJsonSerializerContext.cs index 5b661b87..4cfd232c 100644 --- a/src/Ryujinx.Common/Configuration/TitleUpdateMetadataJsonSerializerContext.cs +++ b/src/Ryujinx.Common/Configuration/TitleUpdateMetadataJsonSerializerContext.cs @@ -7,4 +7,4 @@ namespace Ryujinx.Common.Configuration public partial class TitleUpdateMetadataJsonSerializerContext : JsonSerializerContext { } -}
\ No newline at end of file +} |
