glfw: repatch undefined behavior in X11 keypress handling (#150)
repatch undefined behavior in GLFW which did not land yet and was accidentally removed when updating GLFW in #136 See glfw/glfw#1989 Fixes hexops/mach#149
This commit is contained in:
parent
dc2f2b2a12
commit
1f748d1be8
1 changed files with 1 additions and 1 deletions
|
|
@ -1283,7 +1283,7 @@ static void processEvent(XEvent *event)
|
|||
// (the server never sends a timestamp of zero)
|
||||
// NOTE: Timestamp difference is compared to handle wrap-around
|
||||
Time diff = event->xkey.time - window->x11.keyPressTimes[keycode];
|
||||
if (diff == event->xkey.time || (diff > 0 && diff < (1 << 31)))
|
||||
if (diff == event->xkey.time || (diff > 0 && diff < ((Time)1 << 31)))
|
||||
{
|
||||
if (keycode)
|
||||
_glfwInputKey(window, key, keycode, GLFW_PRESS, mods);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue