mirror of
https://github.com/glfw/glfw.git
synced 2025-06-16 04:32:14 +00:00
fix bit shift runtime error
This commit is contained in:
parent
071d7c0f46
commit
21c46f2a1c
@ -1271,7 +1271,7 @@ static void processEvent(XEvent *event)
|
|||||||
// (the server never sends a timestamp of zero)
|
// (the server never sends a timestamp of zero)
|
||||||
// NOTE: Timestamp difference is compared to handle wrap-around
|
// NOTE: Timestamp difference is compared to handle wrap-around
|
||||||
Time diff = event->xkey.time - window->x11.keyPressTimes[keycode];
|
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 < (1 << 30)))
|
||||||
{
|
{
|
||||||
if (keycode)
|
if (keycode)
|
||||||
_glfwInputKey(window, key, keycode, GLFW_PRESS, mods);
|
_glfwInputKey(window, key, keycode, GLFW_PRESS, mods);
|
||||||
|
Loading…
Reference in New Issue
Block a user