mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-12 14:48:52 +00:00
Add volume slider for title/background music (#1130)
* add volume slider * add translations * stop music when checkbox unchecked * remove GUI build command args * combine functions * add accidentaly removed copyright and licencing information (thanks QT Designer)
This commit is contained in:
@@ -527,7 +527,11 @@ void MainWindow::PlayBackgroundMusic() {
|
||||
int itemID = isTableList ? m_game_list_frame->currentItem()->row()
|
||||
: m_game_grid_frame->crtRow * m_game_grid_frame->columnCnt +
|
||||
m_game_grid_frame->crtColumn;
|
||||
|
||||
if (itemID > m_game_info->m_games.size() - 1) {
|
||||
// Can happen in grid mode
|
||||
BackgroundMusicPlayer::getInstance().stopMusic();
|
||||
return;
|
||||
}
|
||||
QString snd0path;
|
||||
Common::FS::PathToQString(snd0path, m_game_info->m_games[itemID].snd0_path);
|
||||
BackgroundMusicPlayer::getInstance().playMusic(snd0path);
|
||||
@@ -619,6 +623,7 @@ void MainWindow::ConfigureGuiFromSettings() {
|
||||
} else {
|
||||
ui->setlistModeGridAct->setChecked(true);
|
||||
}
|
||||
BackgroundMusicPlayer::getInstance().setVolume(Config::getBGMvolume());
|
||||
}
|
||||
|
||||
void MainWindow::SaveWindowState() const {
|
||||
|
||||
Reference in New Issue
Block a user