mirror of
https://github.com/glfw/glfw.git
synced 2024-11-14 18:34:34 +00:00
Linux: Fix joystick EV_KEY handling indexing below 0 on keyboard input
This commit is contained in:
parent
b4c3ef9d0f
commit
71995aeee9
@ -278,6 +278,7 @@ video tutorials.
|
|||||||
- Jonas Ådahl
|
- Jonas Ådahl
|
||||||
- Lasse Öörni
|
- Lasse Öörni
|
||||||
- Leonard König
|
- Leonard König
|
||||||
|
- Liam Malone
|
||||||
- All the unmentioned and anonymous contributors in the GLFW community, for bug
|
- All the unmentioned and anonymous contributors in the GLFW community, for bug
|
||||||
reports, patches, feedback, testing and encouragement
|
reports, patches, feedback, testing and encouragement
|
||||||
|
|
||||||
|
@ -121,6 +121,8 @@ information on what to include when reporting a bug.
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
- 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_PLATFORM` init hint for runtime platform selection (#1958)
|
||||||
- Added `GLFW_ANY_PLATFORM`, `GLFW_PLATFORM_WIN32`, `GLFW_PLATFORM_COCOA`,
|
- Added `GLFW_ANY_PLATFORM`, `GLFW_PLATFORM_WIN32`, `GLFW_PLATFORM_COCOA`,
|
||||||
`GLFW_PLATFORM_WAYLAND`, `GLFW_PLATFORM_X11` and `GLFW_PLATFORM_NULL` symbols to
|
`GLFW_PLATFORM_WAYLAND`, `GLFW_PLATFORM_X11` and `GLFW_PLATFORM_NULL` symbols to
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
//
|
//
|
||||||
static void handleKeyEvent(_GLFWjoystick* js, int code, int value)
|
static void handleKeyEvent(_GLFWjoystick* js, int code, int value)
|
||||||
{
|
{
|
||||||
_glfwInputJoystickButton(js,
|
if (code - BTN_MISC >= 0) _glfwInputJoystickButton(js,
|
||||||
js->linjs.keyMap[code - BTN_MISC],
|
js->linjs.keyMap[code - BTN_MISC],
|
||||||
value ? GLFW_PRESS : GLFW_RELEASE);
|
value ? GLFW_PRESS : GLFW_RELEASE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user