Skip to content
Permalink
Browse files

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

  • Loading branch information
slouken committed Apr 15, 2002
1 parent 79fb32f commit c930dac6d21620937c0d0827e3d19fd716207a14
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/events/SDL_events.c
@@ -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)

0 comments on commit c930dac

Please sign in to comment.