mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-15 15:58:13 +00:00
log: Wrap the call to the logging implementation in a mutex.
Fixes #2463.
This commit is contained in:
@@ -147,6 +147,9 @@ SDL_SetMainReady(void)
|
||||
SDL_MainIsReady = SDL_TRUE;
|
||||
}
|
||||
|
||||
void SDL_LogInit(void);
|
||||
void SDL_LogQuit(void);
|
||||
|
||||
int
|
||||
SDL_InitSubSystem(Uint32 flags)
|
||||
{
|
||||
@@ -156,6 +159,8 @@ SDL_InitSubSystem(Uint32 flags)
|
||||
return SDL_SetError("Application didn't initialize properly, did you include SDL_main.h in the file containing your main() function?");
|
||||
}
|
||||
|
||||
SDL_LogInit();
|
||||
|
||||
/* Clear the error message */
|
||||
SDL_ClearError();
|
||||
|
||||
@@ -470,12 +475,13 @@ SDL_Quit(void)
|
||||
|
||||
SDL_ClearHints();
|
||||
SDL_AssertionsQuit();
|
||||
SDL_LogResetPriorities();
|
||||
|
||||
#if SDL_USE_LIBDBUS
|
||||
SDL_DBus_Quit();
|
||||
#endif
|
||||
|
||||
SDL_LogQuit();
|
||||
|
||||
/* Now that every subsystem has been quit, we reset the subsystem refcount
|
||||
* and the list of initialized subsystems.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user