diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index c4c74ade..1e38a0ba 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -292,6 +292,7 @@ video tutorials. - Jonas Ådahl - Lasse Öörni - Leonard König + - Liam Malone - All the unmentioned and anonymous contributors in the GLFW community, for bug reports, patches, feedback, testing and encouragement diff --git a/README.md b/README.md index efd1383f..8fd88661 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,8 @@ information on what to include when reporting a bug. ## Changelog since 3.3.10 + - Bugfix: Linux joystick handling would crash with some keyboards, indexing the + associated KeyMap with a value less than 0 - Added `GLFW_PLATFORM` init hint for runtime platform selection (#1958) - Added `GLFW_ANY_PLATFORM`, `GLFW_PLATFORM_WIN32`, `GLFW_PLATFORM_COCOA`, `GLFW_PLATFORM_WAYLAND`, `GLFW_PLATFORM_X11` and `GLFW_PLATFORM_NULL` symbols to diff --git a/src/linux_joystick.c b/src/linux_joystick.c index 07d41d37..3ae9f403 100644 --- a/src/linux_joystick.c +++ b/src/linux_joystick.c @@ -49,7 +49,7 @@ // static void handleKeyEvent(_GLFWjoystick* js, int code, int value) { - _glfwInputJoystickButton(js, + if (code - BTN_MISC >= 0) _glfwInputJoystickButton(js, js->linjs.keyMap[code - BTN_MISC], value ? GLFW_PRESS : GLFW_RELEASE); }