Slightly more efficient to check the event type first
authorSam Lantinga <slouken@libsdl.org>
Fri, 07 Jun 2013 09:39:10 -0700
changeset 7297c43b23f0c000
parent 7296 a8145f734ad3
child 7298 60b241342303
Slightly more efficient to check the event type first
src/joystick/SDL_joystick.c
     1.1 --- a/src/joystick/SDL_joystick.c	Fri Jun 07 08:48:25 2013 -0700
     1.2 +++ b/src/joystick/SDL_joystick.c	Fri Jun 07 09:39:10 2013 -0700
     1.3 @@ -611,7 +611,7 @@
     1.4  
     1.5      /* We ignore events if we don't have keyboard focus, except for button
     1.6       * release. */
     1.7 -    if (SDL_PrivateJoystickShouldIgnoreEvent() && event.type == SDL_JOYBUTTONDOWN) {
     1.8 +    if (event.type == SDL_JOYBUTTONDOWN && SDL_PrivateJoystickShouldIgnoreEvent()) {
     1.9          return 0;
    1.10      }
    1.11