From c010073ddca2fe72bf81281c00a761217425ceee Mon Sep 17 00:00:00 2001 From: tripp <86533397+trippjoe@users.noreply.github.com> Date: Wed, 27 May 2026 21:28:02 -0400 Subject: [PATCH] game: fix missing event.type comparison in joystick axis motion handler (pressure sensitive axii) (#4286) `SDL_EVENT_JOYSTICK_AXIS_MOTION` is an enum with `Value = 1536`, which means the code current acts like: `else if (true && m_has_pressure_sensitive_buttons)` --- game/system/hid/devices/game_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/system/hid/devices/game_controller.cpp b/game/system/hid/devices/game_controller.cpp index d145ffc471..6f0214a96a 100644 --- a/game/system/hid/devices/game_controller.cpp +++ b/game/system/hid/devices/game_controller.cpp @@ -248,7 +248,7 @@ void GameController::process_event(const SDL_Event& event, } } } - } else if (SDL_EVENT_JOYSTICK_AXIS_MOTION && m_has_pressure_sensitive_buttons) { + } else if (event.type == SDL_EVENT_JOYSTICK_AXIS_MOTION && m_has_pressure_sensitive_buttons) { // handle changes in pressure on axii not mapped to the gamepad (ie. PS3 analog buttons) if (m_settings->enable_pressure_sensitivity && pressure_axes_to_button.contains(event.jaxis.axis)) {