fix music playing when it shouldn't (#1203)

This commit is contained in:
tGecko 2024-10-02 17:33:36 +02:00 committed by GitHub
parent 21ecb03e5a
commit 7da3aec15d
2 changed files with 2 additions and 2 deletions

View file

@ -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;
}

View file

@ -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;
}