mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 09:26:25 +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:
@@ -93,7 +93,7 @@ char *SDL_SYS_GetUserFolder(SDL_Folder folder)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
home = SDL_getenv("HOME");
|
||||
home = SDL_GetEnvironmentVariable(SDL_GetEnvironment(), "HOME");
|
||||
if (!home) {
|
||||
SDL_SetError("No $HOME environment variable available");
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user