Updated SDL_PollEvent() documentation

Fixes https://github.com/libsdl-org/sdlwiki/issues/911
This commit is contained in:
Sam Lantinga
2026-01-30 16:23:46 -08:00
parent e3c9ec7b67
commit 63a95a4a4d

View File

@@ -1256,15 +1256,13 @@ extern SDL_DECLSPEC void SDLCALL SDL_FlushEvents(Uint32 minType, Uint32 maxType)
* Poll for currently pending events.
*
* If `event` is not NULL, the next event is removed from the queue and stored
* in the SDL_Event structure pointed to by `event`. The 1 returned refers to
* this event, immediately stored in the SDL Event structure -- not an event
* to follow.
* in the SDL_Event structure pointed to by `event`.
*
* If `event` is NULL, it simply returns 1 if there is an event in the queue,
* If `event` is NULL, it simply returns true if there is an event in the queue,
* but will not remove it from the queue.
*
* As this function may implicitly call SDL_PumpEvents(), you can only call
* this function in the thread that set the video mode.
* this function in the thread that initialized the video subsystem.
*
* SDL_PollEvent() is the favored way of receiving system events since it can
* be done from the main loop and does not suspend the main loop while waiting