mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 00:13:08 +00:00
clang_format
This commit is contained in:
parent
217d221a26
commit
39d806b50e
@ -21,7 +21,7 @@ void BackgroundMusicPlayer::playMusic(const QString& snd0path) {
|
|||||||
}
|
}
|
||||||
QUrl newMusic = QUrl::fromLocalFile(snd0path);
|
QUrl newMusic = QUrl::fromLocalFile(snd0path);
|
||||||
if (m_mediaPlayer->playbackState() == QMediaPlayer::PlayingState &&
|
if (m_mediaPlayer->playbackState() == QMediaPlayer::PlayingState &&
|
||||||
m_currentMusic == newMusic) {
|
m_currentMusic == newMusic) {
|
||||||
// already playing the correct music
|
// already playing the correct music
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@ public:
|
|||||||
void playMusic(const QString& snd0path);
|
void playMusic(const QString& snd0path);
|
||||||
void stopMusic();
|
void stopMusic();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BackgroundMusicPlayer(QObject* parent = nullptr);
|
BackgroundMusicPlayer(QObject* parent = nullptr);
|
||||||
~BackgroundMusicPlayer();
|
~BackgroundMusicPlayer();
|
||||||
|
@ -508,7 +508,7 @@ void MainWindow::CreateConnects() {
|
|||||||
&MainWindow::PlayBackgroundMusic);
|
&MainWindow::PlayBackgroundMusic);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::PlayBackgroundMusic () {
|
void MainWindow::PlayBackgroundMusic() {
|
||||||
if (isGameRunning || !Config::getPlayBGM()) {
|
if (isGameRunning || !Config::getPlayBGM()) {
|
||||||
BackgroundMusicPlayer::getInstance().stopMusic();
|
BackgroundMusicPlayer::getInstance().stopMusic();
|
||||||
return;
|
return;
|
||||||
@ -517,7 +517,7 @@ void MainWindow::PlayBackgroundMusic () {
|
|||||||
int itemID = isTableList ? m_game_list_frame->currentItem()->row()
|
int itemID = isTableList ? m_game_list_frame->currentItem()->row()
|
||||||
: m_game_grid_frame->crtRow * m_game_grid_frame->columnCnt +
|
: m_game_grid_frame->crtRow * m_game_grid_frame->columnCnt +
|
||||||
m_game_grid_frame->crtColumn;
|
m_game_grid_frame->crtColumn;
|
||||||
|
|
||||||
snd0path = QString::fromStdString(m_game_info->m_games[itemID].snd0_path);
|
snd0path = QString::fromStdString(m_game_info->m_games[itemID].snd0_path);
|
||||||
BackgroundMusicPlayer::getInstance().playMusic(snd0path);
|
BackgroundMusicPlayer::getInstance().playMusic(snd0path);
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,6 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices, QWidge
|
|||||||
});
|
});
|
||||||
connect(ui->playBGMCheckBox, &QCheckBox::stateChanged, this,
|
connect(ui->playBGMCheckBox, &QCheckBox::stateChanged, this,
|
||||||
[](int val) { Config::setPlayBGM(val); });
|
[](int val) { Config::setPlayBGM(val); });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GPU TAB
|
// GPU TAB
|
||||||
|
Loading…
Reference in New Issue
Block a user