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:
Ryan C. Gordon
2019-03-15 14:08:30 -04:00
parent cbe80d4708
commit 911bf6241b
4 changed files with 132 additions and 61 deletions

View File

@@ -139,10 +139,9 @@ SDL_InitSubSystem(Uint32 flags)
if ((flags & SDL_INIT_EVENTS)) {
#if !SDL_EVENTS_DISABLED
if (SDL_PrivateShouldInitSubsystem(SDL_INIT_EVENTS)) {
if (SDL_StartEventLoop() < 0) {
if (SDL_EventsInit() < 0) {
return (-1);
}
SDL_QuitInit();
}
SDL_PrivateSubsystemRefCountIncr(SDL_INIT_EVENTS);
#else
@@ -333,8 +332,7 @@ SDL_QuitSubSystem(Uint32 flags)
#if !SDL_EVENTS_DISABLED
if ((flags & SDL_INIT_EVENTS)) {
if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_EVENTS)) {
SDL_QuitQuit();
SDL_StopEventLoop();
SDL_EventsQuit();
}
SDL_PrivateSubsystemRefCountDecr(SDL_INIT_EVENTS);
}