Slightly more efficient to check the event type first
authorSam Lantinga <slouken@libsdl.org>
Fri, 07 Jun 2013 09:39:10 -0700
changeset 7297 c43b23f0c000
parent 7296 a8145f734ad3
child 7298 60b241342303
Slightly more efficient to check the event type first
src/joystick/SDL_joystick.c
--- a/src/joystick/SDL_joystick.c	Fri Jun 07 08:48:25 2013 -0700
+++ b/src/joystick/SDL_joystick.c	Fri Jun 07 09:39:10 2013 -0700
@@ -611,7 +611,7 @@
 
     /* 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;
     }