summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-03-19 04:19:22 +0100
committerGitHub <noreply@github.com>2020-03-19 04:19:22 +0100
commitbc681dc55506a732918f1debbc4ad5956ce09c1b (patch)
tree7a5a526142489e1600412f500a59f6cd475ced07
parentMerge pull request #3535 from ReinUsesLisp/gcc-warnings (diff)
parentyuzu: Save sound output mode and set it to Stereo by default (diff)
downloadyuzu-bc681dc55506a732918f1debbc4ad5956ce09c1b.tar
yuzu-bc681dc55506a732918f1debbc4ad5956ce09c1b.tar.gz
yuzu-bc681dc55506a732918f1debbc4ad5956ce09c1b.tar.bz2
yuzu-bc681dc55506a732918f1debbc4ad5956ce09c1b.tar.lz
yuzu-bc681dc55506a732918f1debbc4ad5956ce09c1b.tar.xz
yuzu-bc681dc55506a732918f1debbc4ad5956ce09c1b.tar.zst
yuzu-bc681dc55506a732918f1debbc4ad5956ce09c1b.zip
-rw-r--r--src/core/settings.h1
-rw-r--r--src/yuzu/configuration/config.cpp4
-rw-r--r--src/yuzu/configuration/configure_system.cpp2
3 files changed, 7 insertions, 0 deletions
diff --git a/src/core/settings.h b/src/core/settings.h
index cb5979e6f..12e2cc9e7 100644
--- a/src/core/settings.h
+++ b/src/core/settings.h
@@ -387,6 +387,7 @@ struct Values {
s32 current_user;
s32 language_index;
+ s32 sound_index;
// Controls
std::array<PlayerInput, 10> players;
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp
index c38860628..e26af33b3 100644
--- a/src/yuzu/configuration/config.cpp
+++ b/src/yuzu/configuration/config.cpp
@@ -698,6 +698,8 @@ void Config::ReadSystemValues() {
Settings::values.custom_rtc = std::nullopt;
}
+ Settings::values.sound_index = ReadSetting(QStringLiteral("sound_index"), 1).toInt();
+
qt_config->endGroup();
}
@@ -1125,6 +1127,8 @@ void Config::SaveSystemValues() {
Settings::values.custom_rtc.value_or(std::chrono::seconds{}).count()),
0);
+ WriteSetting(QStringLiteral("sound_index"), Settings::values.sound_index, 1);
+
qt_config->endGroup();
}
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp
index e1b52f8d9..f9a5b4fbe 100644
--- a/src/yuzu/configuration/configure_system.cpp
+++ b/src/yuzu/configuration/configure_system.cpp
@@ -56,6 +56,7 @@ void ConfigureSystem::SetConfiguration() {
enabled = !Core::System::GetInstance().IsPoweredOn();
ui->combo_language->setCurrentIndex(Settings::values.language_index);
+ ui->combo_sound->setCurrentIndex(Settings::values.sound_index);
ui->rng_seed_checkbox->setChecked(Settings::values.rng_seed.has_value());
ui->rng_seed_edit->setEnabled(Settings::values.rng_seed.has_value());
@@ -81,6 +82,7 @@ void ConfigureSystem::ApplyConfiguration() {
}
Settings::values.language_index = ui->combo_language->currentIndex();
+ Settings::values.sound_index = ui->combo_sound->currentIndex();
if (ui->rng_seed_checkbox->isChecked()) {
Settings::values.rng_seed = ui->rng_seed_edit->text().toULongLong(nullptr, 16);