mirror of
https://github.com/yawut/SDL.git
synced 2026-09-30 04:06:44 -05:00
Fixed SDL_PollEvent() so it only returns a boolean value (not -1)
This commit is contained in:
@@ -372,7 +372,10 @@ int SDL_PollEvent (SDL_Event *event)
|
||||
{
|
||||
SDL_PumpEvents();
|
||||
|
||||
return(SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_ALLEVENTS));
|
||||
/* We can't return -1, just return 0 (no event) on error */
|
||||
if ( SDL_PeepEvents(event, 1, SDL_GETEVENT, SDL_ALLEVENTS) <= 0 )
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int SDL_WaitEvent (SDL_Event *event)
|
||||
|
||||
Reference in New Issue
Block a user