From 08e1c5f0fd4e73fb02797a57ec4074f62e082726 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sat, 8 Jan 2011 19:22:58 +0100 Subject: [PATCH] Add a hack to "fix" endless loop when using axis to change fullscreen. --- input/sdl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/input/sdl.c b/input/sdl.c index aca92a9ae7..3fff9f2d0c 100644 --- a/input/sdl.c +++ b/input/sdl.c @@ -132,6 +132,10 @@ static void sdl_input_free(void *data) { if (data) { + // Flush out all pending events. + SDL_Event event; + while (SDL_PollEvent(&event)); + sdl_input_t *sdl = data; for (int i = 0; i < sdl->num_joysticks; i++) SDL_JoystickClose(sdl->joysticks[i]);