src/joystick/SDL_joystick.c
changeset 7307 5d6b7b9432d3
parent 7297 c43b23f0c000
child 7337 5ba1fafc6a94
equal deleted inserted replaced
7306:1516fe08e6ec 7307:5d6b7b9432d3
   609         return 0;
   609         return 0;
   610     }
   610     }
   611 
   611 
   612     /* We ignore events if we don't have keyboard focus, except for button
   612     /* We ignore events if we don't have keyboard focus, except for button
   613      * release. */
   613      * release. */
   614     if (event.type == SDL_JOYBUTTONDOWN && SDL_PrivateJoystickShouldIgnoreEvent()) {
   614     if (state == SDL_PRESSED && SDL_PrivateJoystickShouldIgnoreEvent()) {
   615         return 0;
   615         return 0;
   616     }
   616     }
   617 
   617 
   618     /* Update internal joystick state */
   618     /* Update internal joystick state */
   619     joystick->buttons[button] = state;
   619     joystick->buttons[button] = state;