diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index a4417c6cb..0c28ca504 100644 --- a/src/joystick/SDL_joystick.c +++ b/src/joystick/SDL_joystick.c @@ -611,7 +611,7 @@ SDL_PrivateJoystickButton(SDL_Joystick * joystick, Uint8 button, Uint8 state) /* We ignore events if we don't have keyboard focus, except for button * release. */ - if (SDL_PrivateJoystickShouldIgnoreEvent() && event.type == SDL_JOYBUTTONDOWN) { + if (event.type == SDL_JOYBUTTONDOWN && SDL_PrivateJoystickShouldIgnoreEvent()) { return 0; }