Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Slightly more efficient to check the event type first

  • Loading branch information
slouken committed Jun 7, 2013
1 parent b914eb7 commit cedd01b430118821aa2e7a7cf7896b56820ce010
Showing with 1 addition and 1 deletion.
  1. +1 −1 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;
}

0 comments on commit cedd01b

Please sign in to comment.