diff options
Diffstat (limited to 'src/m_config.c')
-rw-r--r-- | src/m_config.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/m_config.c b/src/m_config.c index 4f789845..73f0da2c 100644 --- a/src/m_config.c +++ b/src/m_config.c @@ -36,6 +36,8 @@ #include <windows.h> #endif +#include "SDL_mixer.h" + #include "config.h" #include "deh_main.h" #include "doomdef.h" @@ -53,6 +55,7 @@ #include "i_swap.h" #include "i_system.h" #include "i_video.h" +#include "s_sound.h" #include "v_video.h" #include "hu_stuff.h" @@ -1456,5 +1459,21 @@ void M_ApplyPlatformDefaults(void) #ifdef _WIN32_WCE M_ApplyWindowsCEDefaults(); #endif + + // Before SDL_mixer version 1.2.11, MIDI music caused the game + // to crash when it looped. If this is an old SDL_mixer version, + // disable MIDI. + +#ifdef __MACOSX__ + { + const SDL_version *v = Mix_Linked_Version(); + + if (SDL_VERSIONNUM(v->major, v->minor, v->patch) + < SDL_VERSIONNUM(1, 2, 11)) + { + snd_musicdevice = SNDDEVICE_NONE; + } + } +#endif } |