Implement rotate stick 90 degrees clockwise (#3084)

* Implement swapping sticks

* Rotate 90 degrees clockwise

Co-authored-by: matesic.darko@gmail.com <Darkman1979>
This commit is contained in:
darko1979 2022-03-12 18:23:48 +01:00 committed by GitHub
parent 69b05f9918
commit bed516bfda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 0 deletions

View file

@ -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);