diff --git a/src/Ryujinx.Input.SDL2/SDL2JoyCon.cs b/src/Ryujinx.Input.SDL2/SDL2JoyCon.cs index 246a9ed8d..2d6b476f6 100644 --- a/src/Ryujinx.Input.SDL2/SDL2JoyCon.cs +++ b/src/Ryujinx.Input.SDL2/SDL2JoyCon.cs @@ -52,10 +52,10 @@ namespace Ryujinx.Input.SDL2 private readonly List _buttonsUserMapping; - private readonly StickInputId[] _stickUserMapping = new StickInputId[(int)StickInputId.Count] - { - StickInputId.Unbound, StickInputId.Left, StickInputId.Right, - }; + private readonly StickInputId[] _stickUserMapping = + [ + StickInputId.Unbound, StickInputId.Left, StickInputId.Right + ]; public GamepadFeaturesFlag Features { get; } @@ -212,7 +212,8 @@ namespace Ryujinx.Input.SDL2 Vector3 value = _joyConType switch { JoyConType.Left => new Vector3(-values[2], values[1], values[0]), - JoyConType.Right => new Vector3(values[2], values[1], -values[0]) + JoyConType.Right => new Vector3(values[2], values[1], -values[0]), + _ => throw new ArgumentOutOfRangeException() }; return inputId switch diff --git a/src/Ryujinx.Input.SDL2/SDL2JoyConPair.cs b/src/Ryujinx.Input.SDL2/SDL2JoyConPair.cs index e3280ccb4..b00665408 100644 --- a/src/Ryujinx.Input.SDL2/SDL2JoyConPair.cs +++ b/src/Ryujinx.Input.SDL2/SDL2JoyConPair.cs @@ -1,6 +1,4 @@ using Ryujinx.Common.Configuration.Hid; -using Ryujinx.Common.Configuration.Hid.Controller; -using System; using System.Collections.Generic; using System.Linq; using System.Numerics; @@ -10,15 +8,6 @@ namespace Ryujinx.Input.SDL2 { internal class SDL2JoyConPair(IGamepad left, IGamepad right) : IGamepad { - private StandardControllerInputConfig _configuration; - - private readonly StickInputId[] _stickUserMapping = - [ - StickInputId.Unbound, - StickInputId.Left, - StickInputId.Right - ]; - public GamepadFeaturesFlag Features => (left?.Features ?? GamepadFeaturesFlag.None) | (right?.Features ?? GamepadFeaturesFlag.None);