diff --git a/src/qt_gui/background_music_player.cpp b/src/qt_gui/background_music_player.cpp index a63f1d1be..e2b7177b3 100644 --- a/src/qt_gui/background_music_player.cpp +++ b/src/qt_gui/background_music_player.cpp @@ -40,4 +40,5 @@ void BackgroundMusicPlayer::playMusic(const QString& snd0path, bool loops) { void BackgroundMusicPlayer::stopMusic() { m_mediaPlayer->stop(); + m_mediaPlayer->setSource(QUrl("")); } diff --git a/src/qt_gui/gui_context_menus.h b/src/qt_gui/gui_context_menus.h index 8a6e07847..df86686f3 100644 --- a/src/qt_gui/gui_context_menus.h +++ b/src/qt_gui/gui_context_menus.h @@ -10,6 +10,7 @@ #include #include +#include #include "cheats_patches.h" #include "common/config.h" #include "common/version.h" @@ -442,9 +443,12 @@ public: Common::FS::GetUserPath(Common::FS::PathType::MetaDataDir) / m_games[itemID].serial / "TrophyFiles"); - QString message_type = tr("Game"); + QString message_type; - if (selected == deleteUpdate) { + if (selected == deleteGame) { + BackgroundMusicPlayer::getInstance().stopMusic(); + message_type = tr("Game"); + } else if (selected == deleteUpdate) { if (!std::filesystem::exists(Common::FS::PathFromQString(game_update_path))) { QMessageBox::critical(nullptr, tr("Error"), QString(tr("This game has no update to delete!")));