Bugfixes to avoid lock-ups.
authorStephane Peter <megastep@lokigames.com>
Sun, 31 Oct 1999 14:16:07 +0000
changeset 12f38e14b566c8
parent 11 3939a99bf422
child 13 1e489d8b97d8
Bugfixes to avoid lock-ups.
music.c
     1.1 --- a/music.c	Sat Oct 30 22:57:49 1999 +0000
     1.2 +++ b/music.c	Sun Oct 31 14:16:07 1999 +0000
     1.3 @@ -401,7 +401,7 @@
     1.4  		if ( music == music_playing && !music_stopped ) {
     1.5  			if ( music->fading == MIX_FADING_OUT ) {
     1.6  				/* Wait for the fade out to finish */
     1.7 -				while(music->fading == MIX_FADING_OUT)
     1.8 +				while(music_playing && !music_stopped && music_playing->fading == MIX_FADING_OUT)
     1.9  					SDL_Delay(100);
    1.10  			} else {
    1.11  				Mix_HaltMusic(); /* Stop it immediately */
    1.12 @@ -670,7 +670,7 @@
    1.13  /* Pause/Resume the music stream */
    1.14  void Mix_PauseMusic(void)
    1.15  {
    1.16 -	if ( music_playing && !music_stopped ) {
    1.17 +	if ( music_playing && music_active && !music_stopped ) {
    1.18  		switch ( music_playing->type ) {
    1.19  #ifdef CMD_MUSIC
    1.20  		case MUS_CMD:
    1.21 @@ -689,7 +689,7 @@
    1.22  
    1.23  void Mix_ResumeMusic(void)
    1.24  {
    1.25 -	if ( music_playing && !music_stopped ) {
    1.26 +	if ( music_playing && !music_active && !music_stopped ) {
    1.27  		switch ( music_playing->type ) {
    1.28  #ifdef CMD_MUSIC
    1.29  		case MUS_CMD: