From 46b940d571e5db008237409f1e10ef8a60047a48 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sat, 4 Nov 2023 11:31:54 -0700
Subject: [PATCH] Updated documentation to note that the event callback is
called on the same thread as the main iteration callback
---
docs/README-main-functions.md | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/docs/README-main-functions.md b/docs/README-main-functions.md
index 7b6d79b906a0..598560f7ee90 100644
--- a/docs/README-main-functions.md
+++ b/docs/README-main-functions.md
@@ -174,19 +174,11 @@ Next:
int SDL_AppEvent(const SDL_Event *event);
-This will be called once for each event pushed into the SDL queue. This may be
-called from any thread, and possibly in parallel to SDL_AppIterate. The fields
-in event
should not be free’d (as you would normally need to do for
-SDL_EVENT_DROP_FILE, etc), and your app should not call SDL_PollEvent,
-SDL_PumpEvent, etc, as SDL will manage this for you. Return values are the
-same as from SDL_AppIterate(), so you can terminate in response to
-SDL_EVENT_QUIT, etc.
-One can still use their own event filters and watchers. Filters set with
-SDL_SetEventFilter will run before SDL_AppEvent, and if it filters out the
-event, SDL_AppEvent will not run at all. Watchers set with SDL_AddEventWatch
-will run in serial to SDL_AppEvent, as SDL_AppEvent itself is built on top of
-an event watcher; which one runs first is not guaranteed.
+This will be called whenever an SDL event arrives, on the thread that runs
+SDL_AppIterate. You don’t need to call SDL_CleanupEvent(), and your app
+should not call SDL_PollEvent, SDL_PumpEvent, etc, as SDL will manage this
+for you. Return values are the same as from SDL_AppIterate(), so you can
+terminate in response to SDL_EVENT_QUIT, etc.
Finally: