mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-29 22:48:30 +00:00
Added thread-safe environment functions
Also marked the existing functions as unsafe, as they can cause crashes if used in multi-threaded applications. As a bonus, since the new functions are hashtable based, hint environment lookups are much faster.
This commit is contained in:
@@ -255,12 +255,14 @@ void SDL_InitMainThread(void)
|
||||
SDL_InitLog();
|
||||
SDL_InitProperties();
|
||||
SDL_GetGlobalProperties();
|
||||
SDL_GetEnvironment();
|
||||
SDL_InitHints();
|
||||
}
|
||||
|
||||
static void SDL_QuitMainThread(void)
|
||||
{
|
||||
SDL_QuitHints();
|
||||
SDL_CleanupEnvironment();
|
||||
SDL_QuitProperties();
|
||||
SDL_QuitLog();
|
||||
SDL_QuitFilesystem();
|
||||
|
Reference in New Issue
Block a user