ref: 258ef0701e3a2119026a3afc99dd810f6aedc241
parent: 7d6c1ae035e709bf25e49f5cdcc7bec151eb5018
author: Turo Lamminen <turol@iki.fi>
date: Sat Aug 28 13:01:59 EDT 2021
music: Fix const correctness issue in I_InitTimidityConfig
--- a/src/i_sdlmusic.c
+++ b/src/i_sdlmusic.c
@@ -93,6 +93,12 @@
return true;
}
+
+// putenv requires a non-const string whose lifetime is the whole program
+// so can't use a string directly, have to do this silliness
+static char sdl_mixer_disable_fluidsynth[] = "SDL_MIXER_DISABLE_FLUIDSYNTH=1";
+
+
void I_InitTimidityConfig(void)
{
char *env_string;
@@ -121,7 +127,7 @@
// timidity_cfg_path or GUS mode), then disable Fluidsynth, because
// SDL_mixer considers Fluidsynth a higher priority than Timidity and
// therefore can end up circumventing Timidity entirely.
- putenv("SDL_MIXER_DISABLE_FLUIDSYNTH=1");
+ putenv(sdl_mixer_disable_fluidsynth);
}
else
{