From 7da3aec15daa2f8698bf2710331f1c5cf958b96b Mon Sep 17 00:00:00 2001 From: tGecko Date: Wed, 2 Oct 2024 17:33:36 +0200 Subject: [PATCH] fix music playing when it shouldn't (#1203) --- src/qt_gui/game_grid_frame.cpp | 2 +- src/qt_gui/game_list_frame.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qt_gui/game_grid_frame.cpp b/src/qt_gui/game_grid_frame.cpp index 29ea31eb..0292828b 100644 --- a/src/qt_gui/game_grid_frame.cpp +++ b/src/qt_gui/game_grid_frame.cpp @@ -53,7 +53,7 @@ void GameGridFrame::onCurrentCellChanged(int currentRow, int currentColumn, int } void GameGridFrame::PlayBackgroundMusic(QString path) { - if (path.isEmpty()) { + if (path.isEmpty() || !Config::getPlayBGM()) { BackgroundMusicPlayer::getInstance().stopMusic(); return; } diff --git a/src/qt_gui/game_list_frame.cpp b/src/qt_gui/game_list_frame.cpp index 818ee17e..c2f6736b 100644 --- a/src/qt_gui/game_list_frame.cpp +++ b/src/qt_gui/game_list_frame.cpp @@ -80,7 +80,7 @@ void GameListFrame::onCurrentCellChanged(int currentRow, int currentColumn, int } void GameListFrame::PlayBackgroundMusic(QTableWidgetItem* item) { - if (!item) { + if (!item || !Config::getPlayBGM()) { BackgroundMusicPlayer::getInstance().stopMusic(); return; }