Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Make sure events are current before flushing them.
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed May 9, 2010
1 parent f73e12d commit 8294c67
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/events/SDL_events.c
Expand Up @@ -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;
Expand Down

0 comments on commit 8294c67

Please sign in to comment.