Fix key repeat detection on newer X servers
authorSam Lantinga <slouken@lokigames.com>
Sun, 29 Apr 2001 22:59:47 +0000
changeset 1234d956b20f75
parent 11 7b94b6379341
child 13 e30a8ce27c22
Fix key repeat detection on newer X servers
src/video/x11/SDL_x11events.c
     1.1 --- a/src/video/x11/SDL_x11events.c	Sat Apr 28 18:57:18 2001 +0000
     1.2 +++ b/src/video/x11/SDL_x11events.c	Sun Apr 29 22:59:47 2001 +0000
     1.3 @@ -73,7 +73,7 @@
     1.4  		XPeekEvent(display, &peekevent);
     1.5  		if ( (peekevent.type == KeyPress) &&
     1.6  		     (peekevent.xkey.keycode == event->xkey.keycode) &&
     1.7 -		     (peekevent.xkey.time == event->xkey.time) ) {
     1.8 +		     ((peekevent.xkey.time-event->xkey.time) < 2) ) {
     1.9  			repeated = 1;
    1.10  			XNextEvent(display, &peekevent);
    1.11  		}