From b302026b842ee84974b3b2aebd032b6bcfa3200b Mon Sep 17 00:00:00 2001 From: Themaister Date: Sat, 8 Jan 2011 19:28:49 +0100 Subject: [PATCH] Remove joypads from event queue. --- input/sdl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/input/sdl.c b/input/sdl.c index 3fff9f2d0c..b506a0d92d 100644 --- a/input/sdl.c +++ b/input/sdl.c @@ -34,6 +34,7 @@ static void* sdl_input_init(void) if (SDL_Init(SDL_INIT_JOYSTICK) < 0) return NULL; + SDL_JoystickEventState(SDL_IGNORE); sdl->num_joysticks = SDL_NumJoysticks(); if (sdl->num_joysticks > 2) sdl->num_joysticks = 2; @@ -149,6 +150,7 @@ static void sdl_input_poll(void *data) { SDL_PumpEvents(); SDL_Event event; + SDL_JoystickUpdate(); sdl_input_t *sdl = data; // Search for events...