misc: chore: Fix warnings in virtual dual Joy-Con code

This commit is contained in:
KeatonTheBot
2025-04-08 23:19:02 -05:00
parent 25bb6e8af7
commit 6202526666
2 changed files with 6 additions and 16 deletions
+6 -5
View File
@@ -52,10 +52,10 @@ namespace Ryujinx.Input.SDL2
private readonly List<ButtonMappingEntry> _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
-11
View File
@@ -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);