paths finally fixed

This commit is contained in:
georgemoralis 2024-09-26 11:19:32 +03:00
parent 82932c944a
commit a40458ef20
3 changed files with 6 additions and 3 deletions

View file

@ -44,7 +44,8 @@ void GameGridFrame::PlayBackgroundMusic(QTableWidgetItem* item) {
BackgroundMusicPlayer::getInstance().stopMusic();
return;
}
const auto snd0path = QString::fromStdString(m_game_info->m_games[item->row()].snd0_path);
QString snd0path;
Common::FS::PathToQString(snd0path, m_game_info->m_games[item->row()].snd0_path);
BackgroundMusicPlayer::getInstance().playMusic(snd0path);
}

View file

@ -74,7 +74,8 @@ void GameListFrame::PlayBackgroundMusic(QTableWidgetItem* item) {
BackgroundMusicPlayer::getInstance().stopMusic();
return;
}
QString snd0path = Common::FS::PathToQString(m_game_info->m_games[item->row()].snd0_path);
QString snd0path;
Common::FS::PathToQString(snd0path, m_game_info->m_games[item->row()].snd0_path);
BackgroundMusicPlayer::getInstance().playMusic(snd0path);
}

View file

@ -520,7 +520,8 @@ void MainWindow::PlayBackgroundMusic() {
: m_game_grid_frame->crtRow * m_game_grid_frame->columnCnt +
m_game_grid_frame->crtColumn;
QString snd0path = Common::FS::PathToQString(m_game_info->m_games[itemID].snd0_path);
QString snd0path;
Common::FS::PathToQString(snd0path, m_game_info->m_games[itemID].snd0_path);
BackgroundMusicPlayer::getInstance().playMusic(snd0path);
}