Skip to content

Commit

Permalink
Mix_FadeInMusicPos(): fix bug #4216:
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
sezero committed Aug 7, 2018
1 parent c9f8809 commit 8592cac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions music.c
Expand Up @@ -759,6 +759,7 @@ int Mix_FadeInMusicPos(Mix_Music *music, int loops, int ms, double position)
loops = 1;
}
retval = music_internal_play(music, loops, position);
music_active = (retval == 0);
Mix_UnlockAudio();

return(retval);
Expand Down

0 comments on commit 8592cac

Please sign in to comment.