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. --HG-- extra : rebase_source : b8676f90fbb0b57a6d210ba17af0f69b3e543fe4
This commit is contained in:
parent
dde12980b1
commit
64d44bc32f
4 changed files with 132 additions and 61 deletions
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue