mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Decrease amount of Hocus Pocus
This commit is contained in:
parent
de2d4c7763
commit
663ee327b0
@ -976,12 +976,13 @@ static void processEvent(XEvent *event)
|
||||
next.xkey.window == event->xkey.window &&
|
||||
next.xkey.keycode == keycode)
|
||||
{
|
||||
// HACK: Repeat events sometimes leak through due to
|
||||
// some sort of time drift, so add an epsilon
|
||||
// Toshiyuki Takahashi can press a button 16 times
|
||||
// per second so it's fairly safe to assume that
|
||||
// no human is pressing the key 50 times per
|
||||
// second (value is ms)
|
||||
// HACK: The time of repeat events sometimes doesn't
|
||||
// match that of the press event, so add an
|
||||
// epsilon
|
||||
// Toshiyuki Takahashi can press a button
|
||||
// 16 times per second so it's fairly safe to
|
||||
// assume that no human is pressing the key 50
|
||||
// times per second (value is ms)
|
||||
if ((next.xkey.time - event->xkey.time) < 20)
|
||||
{
|
||||
// This is very likely a server-generated key repeat
|
||||
|
Loading…
Reference in New Issue
Block a user