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 a3cdddf050
commit 040fb5a8a3

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