Mix_FadeInMusicPos(): fix bug #4216:
authorOzkan Sezer <sezeroz@gmail.com>
Tue, 07 Aug 2018 10:30:55 +0300
changeset 861671a669e1065
parent 860 0eda5db47348
child 862 fba113e1d189
Mix_FadeInMusicPos(): fix bug #4216:

set music_active according to error returned by music_internal_play().

Vitaly Novichkov (admin@wohlnet.ru) reports:
1) Open any music
2) Start it's playing by Mix_PlayMusic()
3) Pause music by Mix_PauseMusic()
4) Open another music
5) Try to start it by Mix_PlayMusic()
6) Nothing will be played! [The song must be started, but that wasn't happen!!!]
7) Call Mix_ResumeMusic() - and music will begin playing!
music.c
     1.1 --- a/music.c	Wed Aug 01 00:20:02 2018 +0300
     1.2 +++ b/music.c	Tue Aug 07 10:30:55 2018 +0300
     1.3 @@ -759,6 +759,7 @@
     1.4          loops = 1;
     1.5      }
     1.6      retval = music_internal_play(music, loops, position);
     1.7 +    music_active = (retval == 0);
     1.8      Mix_UnlockAudio();
     1.9  
    1.10      return(retval);