From cedd01b430118821aa2e7a7cf7896b56820ce010 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 7 Jun 2013 09:39:10 -0700 Subject: [PATCH] Slightly more efficient to check the event type first --- src/joystick/SDL_joystick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }