Fixed SDL_PollEvent() so it only returns a boolean value (not -1)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40353
This commit is contained in:
Sam Lantinga 2002-04-15 04:51:26 +00:00
parent be790734fd
commit cf126866a9

View file

@ -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)