yuzu-emu
/
yuzu
Archived
1
0
Fork 0

Merge pull request #3527 from FearlessTobi/output-mode

yuzu: Save sound output mode and set it to Stereo by default
This commit is contained in:
bunnei 2020-03-18 23:19:22 -04:00 committed by GitHub
commit bc681dc555
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 0 deletions

View File

@ -387,6 +387,7 @@ struct Values {
s32 current_user; s32 current_user;
s32 language_index; s32 language_index;
s32 sound_index;
// Controls // Controls
std::array<PlayerInput, 10> players; std::array<PlayerInput, 10> players;

View File

@ -698,6 +698,8 @@ void Config::ReadSystemValues() {
Settings::values.custom_rtc = std::nullopt; Settings::values.custom_rtc = std::nullopt;
} }
Settings::values.sound_index = ReadSetting(QStringLiteral("sound_index"), 1).toInt();
qt_config->endGroup(); qt_config->endGroup();
} }
@ -1125,6 +1127,8 @@ void Config::SaveSystemValues() {
Settings::values.custom_rtc.value_or(std::chrono::seconds{}).count()), Settings::values.custom_rtc.value_or(std::chrono::seconds{}).count()),
0); 0);
WriteSetting(QStringLiteral("sound_index"), Settings::values.sound_index, 1);
qt_config->endGroup(); qt_config->endGroup();
} }

View File

@ -56,6 +56,7 @@ void ConfigureSystem::SetConfiguration() {
enabled = !Core::System::GetInstance().IsPoweredOn(); enabled = !Core::System::GetInstance().IsPoweredOn();
ui->combo_language->setCurrentIndex(Settings::values.language_index); 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_checkbox->setChecked(Settings::values.rng_seed.has_value());
ui->rng_seed_edit->setEnabled(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.language_index = ui->combo_language->currentIndex();
Settings::values.sound_index = ui->combo_sound->currentIndex();
if (ui->rng_seed_checkbox->isChecked()) { if (ui->rng_seed_checkbox->isChecked()) {
Settings::values.rng_seed = ui->rng_seed_edit->text().toULongLong(nullptr, 16); Settings::values.rng_seed = ui->rng_seed_edit->text().toULongLong(nullptr, 16);