1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

Fix regression with regaining focus resuming music

Since you've been able to resume music stopped by stopmusic() with
resumemusic(), if a track was stopped by stopmusic(), the unfocus pause
itself would end up resuming the track when regaining focus.

The solution is to simply check for if music.currentsong is -1 or not.
This commit is contained in:
Misa 2021-08-18 20:50:02 -07:00
parent 208382a8d1
commit 8bade56841

View file

@ -327,7 +327,7 @@ void KeyPoll::Poll(void)
if (!game.disablepause) if (!game.disablepause)
{ {
isActive = true; isActive = true;
if (!game.disableaudiopause || !game.disabletemporaryaudiopause) if ((!game.disableaudiopause || !game.disabletemporaryaudiopause) && music.currentsong != -1)
{ {
music.resume(); music.resume();
music.resumeef(); music.resumeef();