Mercurial > SDL_sound_CoreAudio
diff decoders/mikmod.c @ 434:c09cf7c046cd
Prevent a clash between SDL_mixer and SDL_sound in mikmod initialization.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 21 Dec 2002 11:32:50 +0000 |
parents | 077cdba5d5f6 |
children | 3bd3d8da45c2 |
line wrap: on
line diff
--- a/decoders/mikmod.c Sat Dec 21 11:32:14 2002 +0000 +++ b/decoders/mikmod.c Sat Dec 21 11:32:50 2002 +0000 @@ -212,8 +212,17 @@ static int MIKMOD_init(void) { MikMod_RegisterDriver(&drv_nos); - MikMod_RegisterAllLoaders(); - + + /* Quick and dirty hack to prevent an infinite loop problem + * found when using SDL_mixer and SDL_sound together and + * both have MikMod compiled in. So, check to see if + * MikMod has already been registered first before calling + * RegisterAllLoaders() + */ + if(MikMod_InfoLoader() == NULL) + { + MikMod_RegisterAllLoaders(); + } /* * Both DMODE_SOFT_MUSIC and DMODE_16BITS should be set by default, * so this is just for clarity. I haven't experimented with any of