mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 05:27:48 +00:00
events: Make debug logging of the event queue a hint instead of an #ifdef.
This makes it easy to toggle it on when debugging a new platform (or just getting more visibility into an app) without having to rebuild SDL.
This commit is contained in:
@@ -1078,6 +1078,29 @@ extern "C" {
|
||||
#define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING"
|
||||
|
||||
|
||||
/**
|
||||
* \brief A variable controlling whether SDL logs all events pushed onto its internal queue.
|
||||
*
|
||||
* This variable can be set to the following values:
|
||||
*
|
||||
* "0" - Don't log any events (default)
|
||||
* "1" - Log all events except mouse and finger motion, which are pretty spammy.
|
||||
* "2" - Log all events.
|
||||
*
|
||||
* This is generally meant to be used to debug SDL itself, but can be useful
|
||||
* for application developers that need better visibility into what is going
|
||||
* on in the event queue. Logged events are sent through SDL_Log(), which
|
||||
* means by default they appear on stdout on most platforms or maybe
|
||||
* OutputDebugString() on Windows, and can be funneled by the app with
|
||||
* SDL_LogSetOutputFunction(), etc.
|
||||
*
|
||||
* This hint can be toggled on and off at runtime, if you only need to log
|
||||
* events for a small subset of program execution.
|
||||
*/
|
||||
#define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \brief An enumeration of hint priorities
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user