From 8bade56841307bc0529a3d2bb532be3c2b433533 Mon Sep 17 00:00:00 2001 From: Misa Date: Wed, 18 Aug 2021 20:50:02 -0700 Subject: [PATCH] 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. --- desktop_version/src/KeyPoll.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop_version/src/KeyPoll.cpp b/desktop_version/src/KeyPoll.cpp index b7d1ceef..bce3720e 100644 --- a/desktop_version/src/KeyPoll.cpp +++ b/desktop_version/src/KeyPoll.cpp @@ -327,7 +327,7 @@ void KeyPoll::Poll(void) if (!game.disablepause) { isActive = true; - if (!game.disableaudiopause || !game.disabletemporaryaudiopause) + if ((!game.disableaudiopause || !game.disabletemporaryaudiopause) && music.currentsong != -1) { music.resume(); music.resumeef();