Quellcode durchsuchen

Note it is safe to do drawing in response to SDL_EVENT_WINDOW_EXPOSED

Sam Lantinga vor 5 Tagen
Ursprung
Commit
29e6e07396
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      include/SDL3/SDL_events.h

+ 1 - 1
include/SDL3/SDL_events.h

@@ -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