Skip to content

Commit 9ed23a4

Browse files
committed
Updated SDL_SetEventFilter() documentation
1 parent e19a56f commit 9ed23a4

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

include/SDL3/SDL_events.h

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,8 +1377,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PushEvent(SDL_Event *event);
13771377
typedef bool (SDLCALL *SDL_EventFilter)(void *userdata, SDL_Event *event);
13781378

13791379
/**
1380-
* Set up a filter to process all events before they change internal state and
1381-
* are posted to the internal event queue.
1380+
* Set up a filter to process all events before they are added to the internal event queue.
1381+
*
1382+
* If you just want to see events without modifying them or preventing them from being queued, you should use SDL_AddEventWatch() instead.
13821383
*
13831384
* If the filter function returns true when called, then the event will be
13841385
* added to the internal queue. If it returns false, then the event will be
@@ -1392,17 +1393,9 @@ typedef bool (SDLCALL *SDL_EventFilter)(void *userdata, SDL_Event *event);
13921393
* interrupt signal (e.g. pressing Ctrl-C), it will be delivered to the
13931394
* application at the next event poll.
13941395
*
1395-
* There is one caveat when dealing with the SDL_QuitEvent event type. The
1396-
* event filter is only called when the window manager desires to close the
1397-
* application window. If the event filter returns 1, then the window will be
1398-
* closed, otherwise the window will remain open if possible.
1399-
*
14001396
* Note: Disabled events never make it to the event filter function; see
14011397
* SDL_SetEventEnabled().
14021398
*
1403-
* Note: If you just want to inspect events without filtering, you should use
1404-
* SDL_AddEventWatch() instead.
1405-
*
14061399
* Note: Events pushed onto the queue with SDL_PushEvent() get passed through
14071400
* the event filter, but events pushed onto the queue with SDL_PeepEvents() do
14081401
* not.

0 commit comments

Comments
 (0)