Skip to content

Commit 3d8376d

Browse files
committed
update for new thread-safe environment functions in SDL3
Closes: #633
1 parent 124831c commit 3d8376d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

examples/playmus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ int main(int argc, char *argv[])
205205
Mix_VolumeMusic(audio_volume);
206206

207207
/* Set the external music player, if any */
208-
Mix_SetMusicCMD(SDL_getenv("MUSIC_CMD"));
208+
Mix_SetMusicCMD(SDL_GetEnvironmentVariable(SDL_GetEnvironment(), "MUSIC_CMD"));
209209

210210
while (argv[i]) {
211211
next_track = 0;

src/codecs/music_timidity.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static int TIMIDITY_Open(const SDL_AudioSpec *spec)
5959

6060
(void) spec;
6161

62-
cfg = SDL_getenv("TIMIDITY_CFG");
62+
cfg = SDL_GetEnvironmentVariable(SDL_GetEnvironment(), "TIMIDITY_CFG");
6363
if(!cfg) cfg = Mix_GetTimidityCfg();
6464
if (cfg) {
6565
return Timidity_Init(cfg); /* env or user override: no other tries */

src/effects_internal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ int _Mix_effects_max_speed = 0;
3737

3838
void _Mix_InitEffects(void)
3939
{
40-
_Mix_effects_max_speed = (SDL_getenv(MIX_EFFECTSMAXSPEED) != NULL);
40+
_Mix_effects_max_speed = (SDL_GetEnvironmentVariable(SDL_GetEnvironment(), MIX_EFFECTSMAXSPEED) != NULL);
4141
}
4242

4343
void _Mix_DeinitEffects(void)

src/music.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@ SDL_bool Mix_SetSoundFonts(const char *paths)
14951495

14961496
const char* Mix_GetSoundFonts(void)
14971497
{
1498-
const char *env_paths = SDL_getenv("SDL_SOUNDFONTS");
1498+
const char *env_paths = SDL_GetEnvironmentVariable(SDL_GetEnvironment(), "SDL_SOUNDFONTS");
14991499
SDL_bool force_env_paths = SDL_GetHintBoolean("SDL_FORCE_SOUNDFONTS", SDL_FALSE);
15001500
if (force_env_paths && (!env_paths || !*env_paths)) {
15011501
force_env_paths = SDL_FALSE;

0 commit comments

Comments
 (0)