mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 22:14:34 +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.window == event->xkey.window &&
|
||||||
next.xkey.keycode == keycode)
|
next.xkey.keycode == keycode)
|
||||||
{
|
{
|
||||||
// HACK: Repeat events sometimes leak through due to
|
// HACK: The time of repeat events sometimes doesn't
|
||||||
// some sort of time drift, so add an epsilon
|
// match that of the press event, so add an
|
||||||
// Toshiyuki Takahashi can press a button 16 times
|
// epsilon
|
||||||
// per second so it's fairly safe to assume that
|
// Toshiyuki Takahashi can press a button
|
||||||
// no human is pressing the key 50 times per
|
// 16 times per second so it's fairly safe to
|
||||||
// second (value is ms)
|
// assume that no human is pressing the key 50
|
||||||
|
// times per second (value is ms)
|
||||||
if ((next.xkey.time - event->xkey.time) < 20)
|
if ((next.xkey.time - event->xkey.time) < 20)
|
||||||
{
|
{
|
||||||
// This is very likely a server-generated key repeat
|
// This is very likely a server-generated key repeat
|
||||||
|
Loading…
Reference in New Issue
Block a user