mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-26 19:32:40 -06:00
Merge pull request #9951 from Morph1984/save
configure_audio: Fix output mode setting not saving
This commit is contained in:
commit
05f26e1337
2 changed files with 9 additions and 9 deletions
|
@ -54,16 +54,17 @@ void ConfigureAudio::SetConfiguration() {
|
||||||
if (Settings::values.volume.UsingGlobal()) {
|
if (Settings::values.volume.UsingGlobal()) {
|
||||||
ui->volume_combo_box->setCurrentIndex(0);
|
ui->volume_combo_box->setCurrentIndex(0);
|
||||||
ui->volume_slider->setEnabled(false);
|
ui->volume_slider->setEnabled(false);
|
||||||
ui->combo_sound->setCurrentIndex(Settings::values.sound_index.GetValue());
|
|
||||||
} else {
|
} else {
|
||||||
ui->volume_combo_box->setCurrentIndex(1);
|
ui->volume_combo_box->setCurrentIndex(1);
|
||||||
ui->volume_slider->setEnabled(true);
|
ui->volume_slider->setEnabled(true);
|
||||||
ConfigurationShared::SetPerGameSetting(ui->combo_sound, &Settings::values.sound_index);
|
|
||||||
}
|
}
|
||||||
ConfigurationShared::SetHighlight(ui->volume_layout,
|
ConfigurationShared::SetPerGameSetting(ui->combo_sound, &Settings::values.sound_index);
|
||||||
!Settings::values.volume.UsingGlobal());
|
|
||||||
ConfigurationShared::SetHighlight(ui->mode_label,
|
ConfigurationShared::SetHighlight(ui->mode_label,
|
||||||
!Settings::values.sound_index.UsingGlobal());
|
!Settings::values.sound_index.UsingGlobal());
|
||||||
|
ConfigurationShared::SetHighlight(ui->volume_layout,
|
||||||
|
!Settings::values.volume.UsingGlobal());
|
||||||
|
} else {
|
||||||
|
ui->combo_sound->setCurrentIndex(Settings::values.sound_index.GetValue());
|
||||||
}
|
}
|
||||||
SetVolumeIndicatorText(ui->volume_slider->sliderPosition());
|
SetVolumeIndicatorText(ui->volume_slider->sliderPosition());
|
||||||
}
|
}
|
||||||
|
@ -182,14 +183,13 @@ void ConfigureAudio::RetranslateUI() {
|
||||||
|
|
||||||
void ConfigureAudio::SetupPerGameUI() {
|
void ConfigureAudio::SetupPerGameUI() {
|
||||||
if (Settings::IsConfiguringGlobal()) {
|
if (Settings::IsConfiguringGlobal()) {
|
||||||
|
ui->combo_sound->setEnabled(Settings::values.sound_index.UsingGlobal());
|
||||||
ui->volume_slider->setEnabled(Settings::values.volume.UsingGlobal());
|
ui->volume_slider->setEnabled(Settings::values.volume.UsingGlobal());
|
||||||
// ui->combo_sound->setEnabled(Settings::values.sound_index.UsingGlobal());
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ConfigurationShared::SetColoredComboBox(ui->combo_sound, ui->label_sound,
|
ConfigurationShared::SetColoredComboBox(ui->combo_sound, ui->mode_label,
|
||||||
// Settings::values.sound_index.GetValue(true));
|
Settings::values.sound_index.GetValue(true));
|
||||||
|
|
||||||
connect(ui->volume_combo_box, qOverload<int>(&QComboBox::activated), this, [this](int index) {
|
connect(ui->volume_combo_box, qOverload<int>(&QComboBox::activated), this, [this](int index) {
|
||||||
ui->volume_slider->setEnabled(index == 1);
|
ui->volume_slider->setEnabled(index == 1);
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="mode_label">
|
<widget class="QLabel" name="mode_label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Sound Ouput Mode:</string>
|
<string>Sound Output Mode:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Reference in a new issue