Fixed compiler warning (and undefined behavior) in game controller event filter.

This commit is contained in:
Sam Lantinga 2013-02-11 17:25:58 -08:00
parent 8ec12be05a
commit e2aa9f0afb

View file

@ -1065,7 +1065,8 @@ SDL_PrivateGameControllerAxis(SDL_GameController * gamecontroller, SDL_CONTROLLE
int
SDL_PrivateGameControllerButton(SDL_GameController * gamecontroller, SDL_CONTROLLER_BUTTON button, Uint8 state)
{
if ( button == SDL_CONTROLLER_BUTTON_INVALID ) return;
if ( button == SDL_CONTROLLER_BUTTON_INVALID )
return (0);
int posted;
#if !SDL_EVENTS_DISABLED