# HG changeset patch # User Ryan C. Gordon # Date 1040470370 0 # Node ID c09cf7c046cd944d40b43927f58c091c40ebf895 # Parent f1c16afd9ebe85cf4e5f919fce8697554db89fd0 Prevent a clash between SDL_mixer and SDL_sound in mikmod initialization. diff -r f1c16afd9ebe -r c09cf7c046cd decoders/mikmod.c --- 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