Mercurial > SDL_sound_CoreAudio
changeset 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 | f1c16afd9ebe |
children | 63a75d588043 |
files | decoders/mikmod.c |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
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