Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Make sure events are current before flushing them.

  • Loading branch information
slouken committed May 9, 2010
1 parent f73e12d commit 8294c67116afd564b00b67ce7c2a0ccba8c706f6
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/events/SDL_events.c
@@ -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;

0 comments on commit 8294c67

Please sign in to comment.