mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-06 01:12:33 +00:00
combine functions
This commit is contained in:
parent
21bda6d43e
commit
8c256ca6b5
@ -140,20 +140,17 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices, QWidge
|
|||||||
checkUpdate->exec();
|
checkUpdate->exec();
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(ui->playBGMCheckBox, &QCheckBox::stateChanged, this,
|
connect(ui->playBGMCheckBox, &QCheckBox::stateChanged, this, [](int val) {
|
||||||
[](int val) { Config::setPlayBGM(val); });
|
Config::setPlayBGM(val);
|
||||||
|
if (val == Qt::Unchecked) {
|
||||||
connect(ui->BGMVolumeSlider, &QSlider::valueChanged, this,
|
|
||||||
[](float val) { Config::setBGMvolume(val); });
|
|
||||||
|
|
||||||
connect(ui->BGMVolumeSlider, &QSlider::valueChanged, this,
|
|
||||||
[](float val) { BackgroundMusicPlayer::getInstance().setVolume(val); });
|
|
||||||
|
|
||||||
connect(ui->playBGMCheckBox, &QCheckBox::stateChanged, this, [this](int state) {
|
|
||||||
if (state == Qt::Unchecked) {
|
|
||||||
BackgroundMusicPlayer::getInstance().stopMusic();
|
BackgroundMusicPlayer::getInstance().stopMusic();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
connect(ui->BGMVolumeSlider, &QSlider::valueChanged, this, [](float val) {
|
||||||
|
Config::setBGMvolume(val);
|
||||||
|
BackgroundMusicPlayer::getInstance().setVolume(val);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// GPU TAB
|
// GPU TAB
|
||||||
|
Loading…
Reference in New Issue
Block a user