diff options
author | german77 <juangerman-13@hotmail.com> | 2021-11-21 19:59:51 +0100 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2021-11-25 03:30:28 +0100 |
commit | c4760489a0386cdeaed68ecbed7f87532193743e (patch) | |
tree | 2ac91b9c1c6bb0bb70fe7bcf148b2469e96e7247 /src/input_common/drivers/sdl_driver.cpp | |
parent | bootmanager: Use cross-platform keyboard input (diff) | |
download | yuzu-c4760489a0386cdeaed68ecbed7f87532193743e.tar yuzu-c4760489a0386cdeaed68ecbed7f87532193743e.tar.gz yuzu-c4760489a0386cdeaed68ecbed7f87532193743e.tar.bz2 yuzu-c4760489a0386cdeaed68ecbed7f87532193743e.tar.lz yuzu-c4760489a0386cdeaed68ecbed7f87532193743e.tar.xz yuzu-c4760489a0386cdeaed68ecbed7f87532193743e.tar.zst yuzu-c4760489a0386cdeaed68ecbed7f87532193743e.zip |
Diffstat (limited to '')
-rw-r--r-- | src/input_common/drivers/sdl_driver.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp index 0b24f1858..d5af6c09b 100644 --- a/src/input_common/drivers/sdl_driver.cpp +++ b/src/input_common/drivers/sdl_driver.cpp @@ -220,24 +220,6 @@ public: return "Unknown"; } - bool IsYAxis(u8 index) { - if (!sdl_controller) { - return false; - } - - const auto& binding_left_y = - SDL_GameControllerGetBindForAxis(sdl_controller.get(), SDL_CONTROLLER_AXIS_LEFTY); - const auto& binding_right_y = - SDL_GameControllerGetBindForAxis(sdl_controller.get(), SDL_CONTROLLER_AXIS_RIGHTY); - if (index == binding_left_y.value.axis) { - return true; - } - if (index == binding_right_y.value.axis) { - return true; - } - return false; - } - private: std::string guid; int port; @@ -376,11 +358,6 @@ void SDLDriver::HandleGameControllerEvent(const SDL_Event& event) { case SDL_JOYAXISMOTION: { if (const auto joystick = GetSDLJoystickBySDLID(event.jaxis.which)) { const PadIdentifier identifier = joystick->GetPadIdentifier(); - // Vertical axis is inverted on nintendo compared to SDL - if (joystick->IsYAxis(event.jaxis.axis)) { - SetAxis(identifier, event.jaxis.axis, -event.jaxis.value / 32767.0f); - break; - } SetAxis(identifier, event.jaxis.axis, event.jaxis.value / 32767.0f); } break; |