diff --git a/desmume/src/ctrlssdl.cpp b/desmume/src/ctrlssdl.cpp index 8590a5fd3..191bdefc9 100644 --- a/desmume/src/ctrlssdl.cpp +++ b/desmume/src/ctrlssdl.cpp @@ -402,10 +402,13 @@ void process_joystick_events( u16 *keypad) { SDL_Event event; - /* IMPORTANT: Reenable joystick events iif needed. */ + /* IMPORTANT: Reenable joystick events if needed. */ if(SDL_JoystickEventState(SDL_QUERY) == SDL_IGNORE) SDL_JoystickEventState(SDL_ENABLE); + /* Reset the keypad bits */ + *keypad = 0; + /* There's an event waiting to be processed? */ while (SDL_PollEvent(&event)) {