Commit cf126866 authored by Sam Lantinga's avatar Sam Lantinga

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

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40353
parent be790734
...@@ -372,7 +372,10 @@ int SDL_PollEvent (SDL_Event *event) ...@@ -372,7 +372,10 @@ int SDL_PollEvent (SDL_Event *event)
{ {
SDL_PumpEvents(); 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) int SDL_WaitEvent (SDL_Event *event)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment