Commit f1ca7bd167d3f28cbdcc29004231d8c1f372a938

Sam Lantinga 2014-07-09T01:34:40

Clarified the documentation for SDL_FlushEvents() so people know it only affects currently queued events.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/include/SDL_events.h b/include/SDL_events.h
index 3bf604a..21ef3b9 100644
--- a/include/SDL_events.h
+++ b/include/SDL_events.h
@@ -584,6 +584,9 @@ extern DECLSPEC SDL_bool SDLCALL SDL_HasEvents(Uint32 minType, Uint32 maxType);
 
 /**
  *  This function clears events from the event queue
+ *  This function only affects currently queued events. If you want to make
+ *  sure that all pending OS events are flushed, you can call SDL_PumpEvents()
+ *  on the main thread immediately before the flush call.
  */
 extern DECLSPEC void SDLCALL SDL_FlushEvent(Uint32 type);
 extern DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType);