mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-09 12:19:12 +00:00
Fixed Joystick Axis Problems
Fixed Joystick Axis Problems when switching around the Joysticks (Left Stick is Right and Right stick is Left)
This commit is contained in:
parent
56dc5005c4
commit
1f492e99d8
1 changed files with 4 additions and 3 deletions
|
@ -131,7 +131,7 @@ namespace Ryujinx
|
||||||
result = gamePad.ThumbSticks.Left;
|
result = gamePad.ThumbSticks.Left;
|
||||||
break;
|
break;
|
||||||
case "RJoystick":
|
case "RJoystick":
|
||||||
result = gamePad.ThumbSticks.Right;
|
result = new Vector2(-gamePad.ThumbSticks.Right.Y, -gamePad.ThumbSticks.Right.X);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Console.Error.WriteLine("Invalid Joystick Axis \"" + str + "\"! Defaulting the Vector2 to 0, 0.");
|
Console.Error.WriteLine("Invalid Joystick Axis \"" + str + "\"! Defaulting the Vector2 to 0, 0.");
|
||||||
|
@ -235,13 +235,14 @@ namespace Ryujinx
|
||||||
>= 0.5) CurrentButton |= HidControllerButtons.KEY_ZL;
|
>= 0.5) CurrentButton |= HidControllerButtons.KEY_ZL;
|
||||||
|
|
||||||
//RightJoystick
|
//RightJoystick
|
||||||
|
|
||||||
if (getJoystickAxisFromString(gamePad, Config.Controls_Right_FakeJoycon_GamePadJoystick_R).X >= deadzone
|
if (getJoystickAxisFromString(gamePad, Config.Controls_Right_FakeJoycon_GamePadJoystick_R).X >= deadzone
|
||||||
|| getJoystickAxisFromString(gamePad, Config.Controls_Right_FakeJoycon_GamePadJoystick_R).X <= -deadzone)
|
|| getJoystickAxisFromString(gamePad, Config.Controls_Right_FakeJoycon_GamePadJoystick_R).X <= -deadzone)
|
||||||
RightJoystickDY = (int)(-getJoystickAxisFromString(gamePad, Config.Controls_Right_FakeJoycon_GamePadJoystick_R).X * short.MaxValue);
|
RightJoystickDX = (int)(getJoystickAxisFromString(gamePad, Config.Controls_Right_FakeJoycon_GamePadJoystick_R).X * short.MaxValue);
|
||||||
|
|
||||||
if (getJoystickAxisFromString(gamePad, Config.Controls_Right_FakeJoycon_GamePadJoystick_R).Y >= deadzone
|
if (getJoystickAxisFromString(gamePad, Config.Controls_Right_FakeJoycon_GamePadJoystick_R).Y >= deadzone
|
||||||
|| getJoystickAxisFromString(gamePad, Config.Controls_Right_FakeJoycon_GamePadJoystick_R).Y <= -deadzone)
|
|| getJoystickAxisFromString(gamePad, Config.Controls_Right_FakeJoycon_GamePadJoystick_R).Y <= -deadzone)
|
||||||
RightJoystickDX = (int)(-getJoystickAxisFromString(gamePad, Config.Controls_Right_FakeJoycon_GamePadJoystick_R).Y * short.MaxValue);
|
RightJoystickDY = (int)(getJoystickAxisFromString(gamePad, Config.Controls_Right_FakeJoycon_GamePadJoystick_R).Y * short.MaxValue);
|
||||||
|
|
||||||
//LeftJoystick
|
//LeftJoystick
|
||||||
if (getJoystickAxisFromString(gamePad, Config.Controls_Left_FakeJoycon_GamePadJoystick_L).X >= deadzone
|
if (getJoystickAxisFromString(gamePad, Config.Controls_Left_FakeJoycon_GamePadJoystick_L).X >= deadzone
|
||||||
|
|
Loading…
Reference in a new issue