Slightly more efficient to check the event type first

This commit is contained in:
Sam Lantinga 2013-06-07 09:39:10 -07:00
parent 7de1fa00ff
commit 612ec5d29d

View file

@ -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;
}