Make sure events are current before flushing them.

This commit is contained in:
Sam Lantinga 2010-05-09 16:15:14 -07:00
parent 906341c826
commit 2a8171b8b7

View file

@ -401,6 +401,9 @@ SDL_FlushEvents(Uint32 minType, Uint32 maxType)
return;
}
/* Make sure the events are current */
SDL_PumpEvents();
/* Lock the event queue */
if (SDL_mutexP(SDL_EventQ.lock) == 0) {
int spot = SDL_EventQ.head;