From d3138b883f68d886787c4ccda959956a87fe8107 Mon Sep 17 00:00:00 2001 From: din Date: Sat, 7 Sep 2024 19:55:34 -0500 Subject: [PATCH] gamepad event rollover fix --- src/arch/InputHandler/InputHandler_Linux_Event.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/arch/InputHandler/InputHandler_Linux_Event.cpp b/src/arch/InputHandler/InputHandler_Linux_Event.cpp index 80ea3c95f7..e020174126 100644 --- a/src/arch/InputHandler/InputHandler_Linux_Event.cpp +++ b/src/arch/InputHandler/InputHandler_Linux_Event.cpp @@ -391,6 +391,8 @@ void InputHandler_Linux_Event::InputThread() if (event.code >= BTN_JOYSTICK && event.code <= BTN_JOYSTICK + 0xf) { // These guys have arbitrary names, but the kernel code in hid-input.c maps exactly 0xf of them. iNum = event.code - BTN_JOYSTICK; + } else if (event.code >= BTN_GAMEPAD && event.code <= BTN_THUMBR) { + iNum = event.code - BTN_GAMEPAD; } else if (event.code >= BTN_TRIGGER_HAPPY1 && event.code <= BTN_TRIGGER_HAPPY40) { // Actually, we only have 32 buttons defined. iNum = event.code - BTN_TRIGGER_HAPPY1 + 0x10;