Make sure events are current before flushing them.

This commit is contained in:
Sam Lantinga
2010-05-09 16:15:14 -07:00
parent 29596b2204
commit 1b3a6fb5b7

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;