diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/configuration/configure_audio.cpp | 11 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_cpu.cpp | 4 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/yuzu/configuration/configure_audio.cpp b/src/yuzu/configuration/configure_audio.cpp index d32328087..9ccfb2435 100644 --- a/src/yuzu/configuration/configure_audio.cpp +++ b/src/yuzu/configuration/configure_audio.cpp | |||
| @@ -1,13 +1,16 @@ | |||
| 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project | 1 | // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project |
| 2 | // SPDX-License-Identifier: GPL-2.0-or-later | 2 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | 3 | ||
| 4 | #include <map> | ||
| 4 | #include <memory> | 5 | #include <memory> |
| 5 | #include <vector> | 6 | #include <vector> |
| 6 | #include <QComboBox> | 7 | #include <QComboBox> |
| 7 | 8 | ||
| 8 | #include "audio_core/sink/sink.h" | 9 | #include "audio_core/sink/sink.h" |
| 9 | #include "audio_core/sink/sink_details.h" | 10 | #include "audio_core/sink/sink_details.h" |
| 11 | #include "common/common_types.h" | ||
| 10 | #include "common/settings.h" | 12 | #include "common/settings.h" |
| 13 | #include "common/settings_common.h" | ||
| 11 | #include "core/core.h" | 14 | #include "core/core.h" |
| 12 | #include "ui_configure_audio.h" | 15 | #include "ui_configure_audio.h" |
| 13 | #include "yuzu/configuration/configuration_shared.h" | 16 | #include "yuzu/configuration/configuration_shared.h" |
| @@ -33,6 +36,8 @@ void ConfigureAudio::Setup(const ConfigurationShared::Builder& builder) { | |||
| 33 | 36 | ||
| 34 | std::vector<Settings::BasicSetting*> settings; | 37 | std::vector<Settings::BasicSetting*> settings; |
| 35 | 38 | ||
| 39 | std::map<u32, QWidget*> hold; | ||
| 40 | |||
| 36 | auto push = [&](Settings::Category category) { | 41 | auto push = [&](Settings::Category category) { |
| 37 | for (auto* setting : Settings::values.linkage.by_category[category]) { | 42 | for (auto* setting : Settings::values.linkage.by_category[category]) { |
| 38 | settings.push_back(setting); | 43 | settings.push_back(setting); |
| @@ -53,7 +58,7 @@ void ConfigureAudio::Setup(const ConfigurationShared::Builder& builder) { | |||
| 53 | continue; | 58 | continue; |
| 54 | } | 59 | } |
| 55 | 60 | ||
| 56 | layout.addWidget(widget); | 61 | hold.emplace(std::pair{setting->Id(), widget}); |
| 57 | 62 | ||
| 58 | if (setting->Id() == Settings::values.sink_id.Id()) { | 63 | if (setting->Id() == Settings::values.sink_id.Id()) { |
| 59 | // TODO (lat9nq): Let the system manage sink_id | 64 | // TODO (lat9nq): Let the system manage sink_id |
| @@ -70,6 +75,10 @@ void ConfigureAudio::Setup(const ConfigurationShared::Builder& builder) { | |||
| 70 | input_device_combo_box = widget->combobox; | 75 | input_device_combo_box = widget->combobox; |
| 71 | } | 76 | } |
| 72 | } | 77 | } |
| 78 | |||
| 79 | for (const auto& [id, widget] : hold) { | ||
| 80 | layout.addWidget(widget); | ||
| 81 | } | ||
| 73 | } | 82 | } |
| 74 | 83 | ||
| 75 | void ConfigureAudio::SetConfiguration() { | 84 | void ConfigureAudio::SetConfiguration() { |
diff --git a/src/yuzu/configuration/configure_cpu.cpp b/src/yuzu/configuration/configure_cpu.cpp index 08f2b4d9c..a51359903 100644 --- a/src/yuzu/configuration/configure_cpu.cpp +++ b/src/yuzu/configuration/configure_cpu.cpp | |||
| @@ -35,7 +35,7 @@ void ConfigureCpu::SetConfiguration() {} | |||
| 35 | void ConfigureCpu::Setup(const ConfigurationShared::Builder& builder) { | 35 | void ConfigureCpu::Setup(const ConfigurationShared::Builder& builder) { |
| 36 | auto* accuracy_layout = ui->widget_accuracy->layout(); | 36 | auto* accuracy_layout = ui->widget_accuracy->layout(); |
| 37 | auto* unsafe_layout = ui->unsafe_widget->layout(); | 37 | auto* unsafe_layout = ui->unsafe_widget->layout(); |
| 38 | std::map<std::string, QWidget*> unsafe_hold{}; | 38 | std::map<u32, QWidget*> unsafe_hold{}; |
| 39 | 39 | ||
| 40 | std::vector<Settings::BasicSetting*> settings; | 40 | std::vector<Settings::BasicSetting*> settings; |
| 41 | const auto push = [&](Settings::Category category) { | 41 | const auto push = [&](Settings::Category category) { |
| @@ -64,7 +64,7 @@ void ConfigureCpu::Setup(const ConfigurationShared::Builder& builder) { | |||
| 64 | accuracy_combobox = widget->combobox; | 64 | accuracy_combobox = widget->combobox; |
| 65 | } else { | 65 | } else { |
| 66 | // Presently, all other settings here are unsafe checkboxes | 66 | // Presently, all other settings here are unsafe checkboxes |
| 67 | unsafe_hold.insert({setting->GetLabel(), widget}); | 67 | unsafe_hold.insert({setting->Id(), widget}); |
| 68 | } | 68 | } |
| 69 | } | 69 | } |
| 70 | 70 | ||