diff options
Diffstat (limited to 'src/Ryujinx.Common/Configuration/Hid/Controller')
6 files changed, 16 insertions, 16 deletions
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 +} |
