diff options
| author | kraibse <33869366+kraibse@users.noreply.github.com> | 2026-10-31 19:15:50 +0100 |
|---|---|---|
| committer | kraibse <33869366+kraibse@users.noreply.github.com> | 2026-10-31 19:26:04 +0100 |
| commit | c08864b3fed3b6c70418af0e1305395459e266c8 (patch) | |
| tree | 8fccfb4eb58412c00db278dbf461ed311650212d /src/input_common | |
| parent | 1051d394d2063bcf69d69010659fba54c97a4cdf (diff) | |
refactor: remove unused gamepad button and axis event handling in SDLDriver
Diffstat (limited to 'src/input_common')
| -rw-r--r-- | src/input_common/drivers/sdl_driver.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp index 1f1f9543f4..c3e9a066b3 100644 --- a/src/input_common/drivers/sdl_driver.cpp +++ b/src/input_common/drivers/sdl_driver.cpp @@ -589,15 +589,6 @@ void SDLDriver::HandleGameControllerEvent(const SDL_Event& event) { } break; } - case SDL_EVENT_GAMEPAD_BUTTON_DOWN: - case SDL_EVENT_GAMEPAD_BUTTON_UP: { - const bool down = event.type == SDL_EVENT_GAMEPAD_BUTTON_DOWN; - if (const auto joystick = GetSDLJoystickBySDLID(event.gbutton.which)) { - const PadIdentifier identifier = joystick->GetPadIdentifier(); - SetButton(identifier, event.gbutton.button, down); - } - break; - } case SDL_EVENT_JOYSTICK_HAT_MOTION: { if (const auto joystick = GetSDLJoystickBySDLID(event.jhat.which)) { const PadIdentifier identifier = joystick->GetPadIdentifier(); @@ -612,13 +603,6 @@ void SDLDriver::HandleGameControllerEvent(const SDL_Event& event) { } break; } - case SDL_EVENT_GAMEPAD_AXIS_MOTION: { - if (const auto joystick = GetSDLJoystickBySDLID(event.gaxis.which)) { - const PadIdentifier identifier = joystick->GetPadIdentifier(); - SetAxis(identifier, event.gaxis.axis, event.gaxis.value / 32767.0f); - } - break; - } case SDL_EVENT_GAMEPAD_SENSOR_UPDATE: { auto joystick = GetSDLJoystickByGamepadID(event.gsensor.which); if (!joystick) { |
