From 6d01e2587d8ee86502b5bc007ddbc9625029a128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 24 Sep 2024 13:50:21 +0200 Subject: [PATCH] Fix issue with background music playing when going back to the pause screen from game info screen --- UI/PauseScreen.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UI/PauseScreen.cpp b/UI/PauseScreen.cpp index bfa00f2949..44a3d327a0 100644 --- a/UI/PauseScreen.cpp +++ b/UI/PauseScreen.cpp @@ -56,6 +56,7 @@ #include "UI/GameInfoCache.h" #include "UI/DisplayLayoutScreen.h" #include "UI/RetroAchievementScreens.h" +#include "UI/BackgroundAudio.h" static void AfterSaveStateAction(SaveState::Status status, std::string_view message, void *) { if (!message.empty() && (!g_Config.bDumpFrames || !g_Config.bDumpVideoOutput)) { @@ -480,6 +481,9 @@ void GamePauseScreen::dialogFinished(const Screen *dialog, DialogResult dr) { if (tag == "ScreenshotView" && dr == DR_OK) { finishNextFrame_ = true; } else { + if (tag == "Game") { + g_BackgroundAudio.SetGame(Path()); + } // There may have been changes to our savestates, so let's recreate. RecreateViews(); }