music.c
changeset 276 00ff1db6f904
parent 269 1c015da5a712
child 277 7d1be40dca4a
     1.1 --- a/music.c	Sat Jul 16 16:52:28 2005 +0000
     1.2 +++ b/music.c	Sun Aug 21 20:54:52 2005 +0000
     1.3 @@ -327,6 +327,9 @@
     1.4  int open_music(SDL_AudioSpec *mixer)
     1.5  {
     1.6  	int music_error;
     1.7 +#ifdef LIBMIKMOD_MUSIC
     1.8 +	CHAR *list;
     1.9 +#endif
    1.10  
    1.11  	music_error = 0;
    1.12  #ifdef WAV_MUSIC
    1.13 @@ -388,14 +391,17 @@
    1.14  	md_mode |= DMODE_HQMIXER|DMODE_SOFT_MUSIC|DMODE_SURROUND;
    1.15  #endif
    1.16  #ifdef LIBMIKMOD_MUSIC
    1.17 -	if(!MikMod_InfoDriver())
    1.18 -          MikMod_RegisterDriver(&drv_nos);
    1.19 -#else
    1.20 -	MikMod_RegisterAllDrivers();
    1.21 +	list = MikMod_InfoDriver();
    1.22 +	if ( list )
    1.23 +	  free(list);
    1.24 +	else
    1.25  #endif
    1.26 -
    1.27 +	MikMod_RegisterDriver(&drv_nos);
    1.28  #ifdef LIBMIKMOD_MUSIC
    1.29 -	if(!MikMod_InfoLoader())
    1.30 +	list = MikMod_InfoLoader();
    1.31 +	if ( list )
    1.32 +	  free(list);
    1.33 +	else
    1.34  #endif
    1.35  	MikMod_RegisterAllLoaders();
    1.36  	if ( MikMod_Init() ) {