diff options
author | darko1979 <matesic.darko@gmail.com> | 2022-03-12 18:23:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-12 18:23:48 +0100 |
commit | bed516bfda2b558c894e80a0d71f457c6e94a62f (patch) | |
tree | 0eb05e1c391a26285e99df5d970077a52ea679ee /Ryujinx.Input.SDL2/SDL2Gamepad.cs | |
parent | 69b05f99187202b7c09162e4d204f4cac7772018 (diff) |
Implement rotate stick 90 degrees clockwise (#3084)1.1.68
* Implement swapping sticks
* Rotate 90 degrees clockwise
Co-authored-by: matesic.darko@gmail.com <Darkman1979>
Diffstat (limited to 'Ryujinx.Input.SDL2/SDL2Gamepad.cs')
-rw-r--r-- | Ryujinx.Input.SDL2/SDL2Gamepad.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Ryujinx.Input.SDL2/SDL2Gamepad.cs b/Ryujinx.Input.SDL2/SDL2Gamepad.cs index 0ccd8bb3..eec4e07e 100644 --- a/Ryujinx.Input.SDL2/SDL2Gamepad.cs +++ b/Ryujinx.Input.SDL2/SDL2Gamepad.cs @@ -350,6 +350,14 @@ namespace Ryujinx.Input.SDL2 { resultY = -resultY; } + + if ((inputId == StickInputId.Left && _configuration.LeftJoyconStick.Rotate90CW) || + (inputId == StickInputId.Right && _configuration.RightJoyconStick.Rotate90CW)) + { + float temp = resultX; + resultX = resultY; + resultY = -temp; + } } return (resultX, resultY); |