Mixer: Better MODPLUG/MP3_MAD defines

(cherry picked from commit 5b724e18b5)
This commit is contained in:
mazmazz 2018-09-14 17:27:00 -04:00
parent fdbe3e80f6
commit 17ec5d8022

View file

@ -34,6 +34,12 @@
(SDL_MIXER_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)) (SDL_MIXER_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))
#endif #endif
// thanks alam for making the buildbots happy!
#if SDL_MIXER_VERSION_ATLEAST(2,0,3)
#define MUS_MP3_MAD MUS_MP3_MAD_UNUSED
#define MUS_MODPLUG MUS_MODPLUG_UNUSED
#endif
#ifdef HAVE_LIBGME #ifdef HAVE_LIBGME
#include "gme/gme.h" #include "gme/gme.h"
#define GME_TREBLE 5.0 #define GME_TREBLE 5.0
@ -501,17 +507,9 @@ musictype_t I_SongType(void)
return MU_NONE; return MU_NONE;
else if (Mix_GetMusicType(music) == MUS_MID) else if (Mix_GetMusicType(music) == MUS_MID)
return MU_MID; return MU_MID;
else if (Mix_GetMusicType(music) == MUS_MOD else if (Mix_GetMusicType(music) == MUS_MOD || Mix_GetMusicType(music) == MUS_MODPLUG)
#if SDL_MIXER_VERSION_ATLEAST(2,0,3)
|| Mix_GetMusicType(music) == MUS_MODPLUG_UNUSED
#endif
)
return MU_MOD; return MU_MOD;
else if (Mix_GetMusicType(music) == MUS_MP3 else if (Mix_GetMusicType(music) == MUS_MP3 || Mix_GetMusicType(music) == MUS_MP3_MAD)
#if SDL_MIXER_VERSION_ATLEAST(2,0,3)
|| Mix_GetMusicType(music) == MUS_MP3_MAD_UNUSED
#endif
)
return MU_MP3; return MU_MP3;
else else
return (musictype_t)Mix_GetMusicType(music); return (musictype_t)Mix_GetMusicType(music);