mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 08:22:32 +00:00
+
using the save and close buttons, everything works fine, but when using the X button it doesn't work very well...
This commit is contained in:
parent
3110876afe
commit
4f6f652d52
@ -129,6 +129,10 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices,
|
|||||||
Config::save(config_dir / "config.toml");
|
Config::save(config_dir / "config.toml");
|
||||||
LoadValuesFromConfig();
|
LoadValuesFromConfig();
|
||||||
} else if (button == ui->buttonBox->button(QDialogButtonBox::Close)) {
|
} else if (button == ui->buttonBox->button(QDialogButtonBox::Close)) {
|
||||||
|
ui->backgroundImageOpacitySlider->setValue(backgroundImageOpacitySlider_backup);
|
||||||
|
emit BackgroundOpacityChanged(backgroundImageOpacitySlider_backup);
|
||||||
|
ui->BGMVolumeSlider->setValue(bgm_volume_backup);
|
||||||
|
BackgroundMusicPlayer::getInstance().setVolume(bgm_volume_backup);
|
||||||
ResetInstallFolders();
|
ResetInstallFolders();
|
||||||
}
|
}
|
||||||
if (Common::Log::IsActive()) {
|
if (Common::Log::IsActive()) {
|
||||||
@ -338,13 +342,6 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices,
|
|||||||
ui->copyGPUBuffersCheckBox->installEventFilter(this);
|
ui->copyGPUBuffersCheckBox->installEventFilter(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void SettingsDialog::closeEvent(QCloseEvent* event) {
|
|
||||||
ui->backgroundImageOpacitySlider->setValue(backgroundImageOpacitySlider_backup);
|
|
||||||
emit BackgroundOpacityChanged(backgroundImageOpacitySlider_backup);
|
|
||||||
ui->BGMVolumeSlider->setValue(bgm_volume_backup);
|
|
||||||
BackgroundMusicPlayer::getInstance().setVolume(bgm_volume_backup);
|
|
||||||
QDialog::closeEvent(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SettingsDialog::LoadValuesFromConfig() {
|
void SettingsDialog::LoadValuesFromConfig() {
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@ signals:
|
|||||||
void BackgroundOpacityChanged(int opacity);
|
void BackgroundOpacityChanged(int opacity);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void closeEvent(QCloseEvent* event) override;
|
|
||||||
void LoadValuesFromConfig();
|
void LoadValuesFromConfig();
|
||||||
void UpdateSettings();
|
void UpdateSettings();
|
||||||
void ResetInstallFolders();
|
void ResetInstallFolders();
|
||||||
|
Loading…
Reference in New Issue
Block a user