Mix_FadeInMusicPos: set music_active acc. to music_internal_play() return code SDL-1.2
authorOzkan Sezer <sezeroz@gmail.com>
Sat, 06 Oct 2018 22:41:10 +0300
branchSDL-1.2
changeset 864c8dc1ec196f5
parent 597 a4e9c53d9c30
child 865 3ffb22a2755b
Mix_FadeInMusicPos: set music_active acc. to music_internal_play() return code

c.f. default (2.0) branch commit 671a669e1065
music.c
     1.1 --- a/music.c	Thu Jan 03 10:18:59 2013 -0500
     1.2 +++ b/music.c	Sat Oct 06 22:41:10 2018 +0300
     1.3 @@ -1016,13 +1016,13 @@
     1.4  		SDL_Delay(100);
     1.5  		SDL_LockAudio();
     1.6  	}
     1.7 -	music_active = 1;
     1.8  	if (loops == 1) {
     1.9  		/* Loop is the number of times to play the audio */
    1.10  		loops = 0;
    1.11  	}
    1.12  	music_loops = loops;
    1.13  	retval = music_internal_play(music, position);
    1.14 +	music_active = (retval == 0);
    1.15  	SDL_UnlockAudio();
    1.16  
    1.17  	return(retval);