mirror of
https://github.com/encounter/SDL.git
synced 2025-12-08 13:15:10 +00:00
joystick: Linux joysticks now recover better from dropped events.
Fixes Bugzilla #4830.
This commit is contained in:
@@ -167,6 +167,14 @@ loop(void *arg)
|
||||
event.jbutton.which, event.jbutton.button);
|
||||
break;
|
||||
case SDL_KEYDOWN:
|
||||
/* Press the L key to lag for 3 seconds, to see what happens
|
||||
when SDL doesn't service the event loop quickly. */
|
||||
if (event.key.keysym.sym == SDLK_l) {
|
||||
SDL_Log("Lagging for 3 seconds...\n");
|
||||
SDL_Delay(3000);
|
||||
break;
|
||||
}
|
||||
|
||||
if ((event.key.keysym.sym != SDLK_ESCAPE) &&
|
||||
(event.key.keysym.sym != SDLK_AC_BACK)) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user