Note it is safe to do drawing in response to SDL_EVENT_WINDOW_EXPOSED

This commit is contained in:
Sam Lantinga
2025-09-14 10:19:14 -07:00
parent 1aba421bd3
commit 29e6e07396

View File

@@ -1396,7 +1396,7 @@ typedef bool (SDLCALL *SDL_EventFilter)(void *userdata, SDL_Event *event);
* allows selective filtering of dynamically arriving events.
*
* **WARNING**: Be very careful of what you do in the event filter function,
* as it may run in a different thread!
* as it may run in a different thread! The exception is handling of SDL_EVENT_WINDOW_EXPOSED, which is guaranteed to be sent from the OS on the main thread and you are expected to redraw your window in response to this event.
*
* On platforms that support it, if the quit event is generated by an
* interrupt signal (e.g. pressing Ctrl-C), it will be delivered to the