mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-28 17:41:38 +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:
@@ -87,7 +87,7 @@ static void SDL_EnumUnixAudioDevices_Internal(const bool recording, const bool c
|
||||
}
|
||||
|
||||
// Figure out what our audio device is
|
||||
audiodev = SDL_getenv("AUDIODEV");
|
||||
audiodev = SDL_GetEnvironmentVariable(SDL_GetEnvironment(), "AUDIODEV");
|
||||
if (!audiodev) {
|
||||
if (classic) {
|
||||
audiodev = SDL_PATH_DEV_AUDIO;
|
||||
|
||||
Reference in New Issue
Block a user