summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2020-11-04 17:09:19 -0800
committerGravatar GitHub2020-11-04 17:09:19 -0800
commitd62d28522b7ac49dcf76b82337d0963152d04feb (patch)
tree95f6d17dc15443b9870c03ea7930d9c9866873c2
parentMerge pull request #4858 from lioncash/initializer (diff)
parentcore/settings: Move configuring_global behind an API (diff)
downloadyuzu-d62d28522b7ac49dcf76b82337d0963152d04feb.tar.gz
yuzu-d62d28522b7ac49dcf76b82337d0963152d04feb.tar.xz
yuzu-d62d28522b7ac49dcf76b82337d0963152d04feb.zip
Merge pull request #4889 from lioncash/setting-global
core/settings: Move configuring_global behind an API
-rw-r--r--src/core/settings.cpp20
-rw-r--r--src/core/settings.h11
-rw-r--r--src/yuzu/configuration/configure_audio.cpp10
-rw-r--r--src/yuzu/configuration/configure_dialog.cpp2
-rw-r--r--src/yuzu/configuration/configure_general.cpp8
-rw-r--r--src/yuzu/configuration/configure_graphics.cpp18
-rw-r--r--src/yuzu/configuration/configure_graphics_advanced.cpp8
-rw-r--r--src/yuzu/configuration/configure_per_game.cpp2
-rw-r--r--src/yuzu/configuration/configure_system.cpp10
9 files changed, 50 insertions, 39 deletions
diff --git a/src/core/settings.cpp b/src/core/settings.cpp
index e14c02045..a99d3cf5a 100644
--- a/src/core/settings.cpp
+++ b/src/core/settings.cpp
@@ -14,7 +14,7 @@
14namespace Settings { 14namespace Settings {
15 15
16Values values = {}; 16Values values = {};
17bool configuring_global = true; 17static bool configuring_global = true;
18 18
19std::string GetTimeZoneString() { 19std::string GetTimeZoneString() {
20 static constexpr std::array timezones{ 20 static constexpr std::array timezones{
@@ -81,11 +81,12 @@ void LogSettings() {
81 log_setting("Services_BCATBoxcatLocal", values.bcat_boxcat_local); 81 log_setting("Services_BCATBoxcatLocal", values.bcat_boxcat_local);
82} 82}
83 83
84float Volume() { 84bool IsConfiguringGlobal() {
85 if (values.audio_muted) { 85 return configuring_global;
86 return 0.0f; 86}
87 } 87
88 return values.volume.GetValue(); 88void SetConfiguringGlobal(bool is_global) {
89 configuring_global = is_global;
89} 90}
90 91
91bool IsGPULevelExtreme() { 92bool IsGPULevelExtreme() {
@@ -97,6 +98,13 @@ bool IsGPULevelHigh() {
97 values.gpu_accuracy.GetValue() == GPUAccuracy::High; 98 values.gpu_accuracy.GetValue() == GPUAccuracy::High;
98} 99}
99 100
101float Volume() {
102 if (values.audio_muted) {
103 return 0.0f;
104 }
105 return values.volume.GetValue();
106}
107
100void RestoreGlobalState() { 108void RestoreGlobalState() {
101 // If a game is running, DO NOT restore the global settings state 109 // If a game is running, DO NOT restore the global settings state
102 if (Core::System::GetInstance().IsPoweredOn()) { 110 if (Core::System::GetInstance().IsPoweredOn()) {
diff --git a/src/core/settings.h b/src/core/settings.h
index 604805615..dcb1dbb31 100644
--- a/src/core/settings.h
+++ b/src/core/settings.h
@@ -33,8 +33,6 @@ enum class CPUAccuracy {
33 DebugMode = 2, 33 DebugMode = 2,
34}; 34};
35 35
36extern bool configuring_global;
37
38template <typename Type> 36template <typename Type>
39class Setting final { 37class Setting final {
40public: 38public:
@@ -198,13 +196,18 @@ struct Values {
198 196
199 // Add-Ons 197 // Add-Ons
200 std::map<u64, std::vector<std::string>> disabled_addons; 198 std::map<u64, std::vector<std::string>> disabled_addons;
201} extern values; 199};
202 200
203float Volume(); 201extern Values values;
202
203bool IsConfiguringGlobal();
204void SetConfiguringGlobal(bool is_global);
204 205
205bool IsGPULevelExtreme(); 206bool IsGPULevelExtreme();
206bool IsGPULevelHigh(); 207bool IsGPULevelHigh();
207 208
209float Volume();
210
208std::string GetTimeZoneString(); 211std::string GetTimeZoneString();
209 212
210void Apply(); 213void Apply();
diff --git a/src/yuzu/configuration/configure_audio.cpp b/src/yuzu/configuration/configure_audio.cpp
index fa9124ecf..db9518798 100644
--- a/src/yuzu/configuration/configure_audio.cpp
+++ b/src/yuzu/configuration/configure_audio.cpp
@@ -25,8 +25,8 @@ ConfigureAudio::ConfigureAudio(QWidget* parent)
25 connect(ui->output_sink_combo_box, qOverload<int>(&QComboBox::currentIndexChanged), this, 25 connect(ui->output_sink_combo_box, qOverload<int>(&QComboBox::currentIndexChanged), this,
26 &ConfigureAudio::UpdateAudioDevices); 26 &ConfigureAudio::UpdateAudioDevices);
27 27
28 ui->volume_label->setVisible(Settings::configuring_global); 28 ui->volume_label->setVisible(Settings::IsConfiguringGlobal());
29 ui->volume_combo_box->setVisible(!Settings::configuring_global); 29 ui->volume_combo_box->setVisible(!Settings::IsConfiguringGlobal());
30 30
31 SetupPerGameUI(); 31 SetupPerGameUI();
32 32
@@ -51,7 +51,7 @@ void ConfigureAudio::SetConfiguration() {
51 51
52 ui->toggle_audio_stretching->setChecked(Settings::values.enable_audio_stretching.GetValue()); 52 ui->toggle_audio_stretching->setChecked(Settings::values.enable_audio_stretching.GetValue());
53 53
54 if (!Settings::configuring_global) { 54 if (!Settings::IsConfiguringGlobal()) {
55 if (Settings::values.volume.UsingGlobal()) { 55 if (Settings::values.volume.UsingGlobal()) {
56 ui->volume_combo_box->setCurrentIndex(0); 56 ui->volume_combo_box->setCurrentIndex(0);
57 ui->volume_slider->setEnabled(false); 57 ui->volume_slider->setEnabled(false);
@@ -99,7 +99,7 @@ void ConfigureAudio::SetVolumeIndicatorText(int percentage) {
99} 99}
100 100
101void ConfigureAudio::ApplyConfiguration() { 101void ConfigureAudio::ApplyConfiguration() {
102 if (Settings::configuring_global) { 102 if (Settings::IsConfiguringGlobal()) {
103 Settings::values.sink_id = 103 Settings::values.sink_id =
104 ui->output_sink_combo_box->itemText(ui->output_sink_combo_box->currentIndex()) 104 ui->output_sink_combo_box->itemText(ui->output_sink_combo_box->currentIndex())
105 .toStdString(); 105 .toStdString();
@@ -165,7 +165,7 @@ void ConfigureAudio::RetranslateUI() {
165} 165}
166 166
167void ConfigureAudio::SetupPerGameUI() { 167void ConfigureAudio::SetupPerGameUI() {
168 if (Settings::configuring_global) { 168 if (Settings::IsConfiguringGlobal()) {
169 ui->volume_slider->setEnabled(Settings::values.volume.UsingGlobal()); 169 ui->volume_slider->setEnabled(Settings::values.volume.UsingGlobal());
170 ui->toggle_audio_stretching->setEnabled( 170 ui->toggle_audio_stretching->setEnabled(
171 Settings::values.enable_audio_stretching.UsingGlobal()); 171 Settings::values.enable_audio_stretching.UsingGlobal());
diff --git a/src/yuzu/configuration/configure_dialog.cpp b/src/yuzu/configuration/configure_dialog.cpp
index 8186929a6..5041e0bf8 100644
--- a/src/yuzu/configuration/configure_dialog.cpp
+++ b/src/yuzu/configuration/configure_dialog.cpp
@@ -15,7 +15,7 @@
15ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry, 15ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry,
16 InputCommon::InputSubsystem* input_subsystem) 16 InputCommon::InputSubsystem* input_subsystem)
17 : QDialog(parent), ui(new Ui::ConfigureDialog), registry(registry) { 17 : QDialog(parent), ui(new Ui::ConfigureDialog), registry(registry) {
18 Settings::configuring_global = true; 18 Settings::SetConfiguringGlobal(true);
19 19
20 ui->setupUi(this); 20 ui->setupUi(this);
21 ui->hotkeysTab->Populate(registry); 21 ui->hotkeysTab->Populate(registry);
diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp
index 830096ea0..d4d29d422 100644
--- a/src/yuzu/configuration/configure_general.cpp
+++ b/src/yuzu/configuration/configure_general.cpp
@@ -19,7 +19,7 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent)
19 19
20 SetConfiguration(); 20 SetConfiguration();
21 21
22 if (Settings::configuring_global) { 22 if (Settings::IsConfiguringGlobal()) {
23 connect(ui->toggle_frame_limit, &QCheckBox::clicked, ui->frame_limit, 23 connect(ui->toggle_frame_limit, &QCheckBox::clicked, ui->frame_limit,
24 [this]() { ui->frame_limit->setEnabled(ui->toggle_frame_limit->isChecked()); }); 24 [this]() { ui->frame_limit->setEnabled(ui->toggle_frame_limit->isChecked()); });
25 } 25 }
@@ -41,7 +41,7 @@ void ConfigureGeneral::SetConfiguration() {
41 ui->toggle_frame_limit->setChecked(Settings::values.use_frame_limit.GetValue()); 41 ui->toggle_frame_limit->setChecked(Settings::values.use_frame_limit.GetValue());
42 ui->frame_limit->setValue(Settings::values.frame_limit.GetValue()); 42 ui->frame_limit->setValue(Settings::values.frame_limit.GetValue());
43 43
44 if (Settings::configuring_global) { 44 if (Settings::IsConfiguringGlobal()) {
45 ui->frame_limit->setEnabled(Settings::values.use_frame_limit.GetValue()); 45 ui->frame_limit->setEnabled(Settings::values.use_frame_limit.GetValue());
46 } else { 46 } else {
47 ui->frame_limit->setEnabled(Settings::values.use_frame_limit.GetValue() && 47 ui->frame_limit->setEnabled(Settings::values.use_frame_limit.GetValue() &&
@@ -50,7 +50,7 @@ void ConfigureGeneral::SetConfiguration() {
50} 50}
51 51
52void ConfigureGeneral::ApplyConfiguration() { 52void ConfigureGeneral::ApplyConfiguration() {
53 if (Settings::configuring_global) { 53 if (Settings::IsConfiguringGlobal()) {
54 UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked(); 54 UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked();
55 UISettings::values.select_user_on_boot = ui->toggle_user_on_boot->isChecked(); 55 UISettings::values.select_user_on_boot = ui->toggle_user_on_boot->isChecked();
56 UISettings::values.pause_when_in_background = ui->toggle_background_pause->isChecked(); 56 UISettings::values.pause_when_in_background = ui->toggle_background_pause->isChecked();
@@ -93,7 +93,7 @@ void ConfigureGeneral::RetranslateUI() {
93} 93}
94 94
95void ConfigureGeneral::SetupPerGameUI() { 95void ConfigureGeneral::SetupPerGameUI() {
96 if (Settings::configuring_global) { 96 if (Settings::IsConfiguringGlobal()) {
97 ui->toggle_frame_limit->setEnabled(Settings::values.use_frame_limit.UsingGlobal()); 97 ui->toggle_frame_limit->setEnabled(Settings::values.use_frame_limit.UsingGlobal());
98 ui->frame_limit->setEnabled(Settings::values.frame_limit.UsingGlobal()); 98 ui->frame_limit->setEnabled(Settings::values.frame_limit.UsingGlobal());
99 99
diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp
index 4f083ecda..6fda0ce35 100644
--- a/src/yuzu/configuration/configure_graphics.cpp
+++ b/src/yuzu/configuration/configure_graphics.cpp
@@ -33,7 +33,7 @@ ConfigureGraphics::ConfigureGraphics(QWidget* parent)
33 33
34 connect(ui->api, qOverload<int>(&QComboBox::currentIndexChanged), this, [this] { 34 connect(ui->api, qOverload<int>(&QComboBox::currentIndexChanged), this, [this] {
35 UpdateDeviceComboBox(); 35 UpdateDeviceComboBox();
36 if (!Settings::configuring_global) { 36 if (!Settings::IsConfiguringGlobal()) {
37 ConfigurationShared::SetHighlight( 37 ConfigurationShared::SetHighlight(
38 ui->api_layout, ui->api->currentIndex() != ConfigurationShared::USE_GLOBAL_INDEX); 38 ui->api_layout, ui->api->currentIndex() != ConfigurationShared::USE_GLOBAL_INDEX);
39 } 39 }
@@ -49,8 +49,8 @@ ConfigureGraphics::ConfigureGraphics(QWidget* parent)
49 UpdateBackgroundColorButton(new_bg_color); 49 UpdateBackgroundColorButton(new_bg_color);
50 }); 50 });
51 51
52 ui->bg_label->setVisible(Settings::configuring_global); 52 ui->bg_label->setVisible(Settings::IsConfiguringGlobal());
53 ui->bg_combobox->setVisible(!Settings::configuring_global); 53 ui->bg_combobox->setVisible(!Settings::IsConfiguringGlobal());
54} 54}
55 55
56void ConfigureGraphics::UpdateDeviceSelection(int device) { 56void ConfigureGraphics::UpdateDeviceSelection(int device) {
@@ -76,7 +76,7 @@ void ConfigureGraphics::SetConfiguration() {
76 Settings::values.use_asynchronous_gpu_emulation.GetValue()); 76 Settings::values.use_asynchronous_gpu_emulation.GetValue());
77 ui->use_nvdec_emulation->setChecked(Settings::values.use_nvdec_emulation.GetValue()); 77 ui->use_nvdec_emulation->setChecked(Settings::values.use_nvdec_emulation.GetValue());
78 78
79 if (Settings::configuring_global) { 79 if (Settings::IsConfiguringGlobal()) {
80 ui->api->setCurrentIndex(static_cast<int>(Settings::values.renderer_backend.GetValue())); 80 ui->api->setCurrentIndex(static_cast<int>(Settings::values.renderer_backend.GetValue()));
81 ui->aspect_ratio_combobox->setCurrentIndex(Settings::values.aspect_ratio.GetValue()); 81 ui->aspect_ratio_combobox->setCurrentIndex(Settings::values.aspect_ratio.GetValue());
82 } else { 82 } else {
@@ -100,7 +100,7 @@ void ConfigureGraphics::SetConfiguration() {
100} 100}
101 101
102void ConfigureGraphics::ApplyConfiguration() { 102void ConfigureGraphics::ApplyConfiguration() {
103 if (Settings::configuring_global) { 103 if (Settings::IsConfiguringGlobal()) {
104 // Guard if during game and set to game-specific value 104 // Guard if during game and set to game-specific value
105 if (Settings::values.renderer_backend.UsingGlobal()) { 105 if (Settings::values.renderer_backend.UsingGlobal()) {
106 Settings::values.renderer_backend.SetValue(GetCurrentGraphicsBackend()); 106 Settings::values.renderer_backend.SetValue(GetCurrentGraphicsBackend());
@@ -194,7 +194,7 @@ void ConfigureGraphics::UpdateDeviceComboBox() {
194 194
195 bool enabled = false; 195 bool enabled = false;
196 196
197 if (!Settings::configuring_global && 197 if (!Settings::IsConfiguringGlobal() &&
198 ui->api->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) { 198 ui->api->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
199 vulkan_device = Settings::values.vulkan_device.GetValue(); 199 vulkan_device = Settings::values.vulkan_device.GetValue();
200 } 200 }
@@ -212,7 +212,7 @@ void ConfigureGraphics::UpdateDeviceComboBox() {
212 break; 212 break;
213 } 213 }
214 // If in per-game config and use global is selected, don't enable. 214 // If in per-game config and use global is selected, don't enable.
215 enabled &= !(!Settings::configuring_global && 215 enabled &= !(!Settings::IsConfiguringGlobal() &&
216 ui->api->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX); 216 ui->api->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX);
217 ui->device->setEnabled(enabled && !Core::System::GetInstance().IsPoweredOn()); 217 ui->device->setEnabled(enabled && !Core::System::GetInstance().IsPoweredOn());
218} 218}
@@ -227,7 +227,7 @@ void ConfigureGraphics::RetrieveVulkanDevices() {
227} 227}
228 228
229Settings::RendererBackend ConfigureGraphics::GetCurrentGraphicsBackend() const { 229Settings::RendererBackend ConfigureGraphics::GetCurrentGraphicsBackend() const {
230 if (Settings::configuring_global) { 230 if (Settings::IsConfiguringGlobal()) {
231 return static_cast<Settings::RendererBackend>(ui->api->currentIndex()); 231 return static_cast<Settings::RendererBackend>(ui->api->currentIndex());
232 } 232 }
233 233
@@ -241,7 +241,7 @@ Settings::RendererBackend ConfigureGraphics::GetCurrentGraphicsBackend() const {
241} 241}
242 242
243void ConfigureGraphics::SetupPerGameUI() { 243void ConfigureGraphics::SetupPerGameUI() {
244 if (Settings::configuring_global) { 244 if (Settings::IsConfiguringGlobal()) {
245 ui->api->setEnabled(Settings::values.renderer_backend.UsingGlobal()); 245 ui->api->setEnabled(Settings::values.renderer_backend.UsingGlobal());
246 ui->device->setEnabled(Settings::values.renderer_backend.UsingGlobal()); 246 ui->device->setEnabled(Settings::values.renderer_backend.UsingGlobal());
247 ui->aspect_ratio_combobox->setEnabled(Settings::values.aspect_ratio.UsingGlobal()); 247 ui->aspect_ratio_combobox->setEnabled(Settings::values.aspect_ratio.UsingGlobal());
diff --git a/src/yuzu/configuration/configure_graphics_advanced.cpp b/src/yuzu/configuration/configure_graphics_advanced.cpp
index 73f276949..383c7bac8 100644
--- a/src/yuzu/configuration/configure_graphics_advanced.cpp
+++ b/src/yuzu/configuration/configure_graphics_advanced.cpp
@@ -32,7 +32,7 @@ void ConfigureGraphicsAdvanced::SetConfiguration() {
32 ui->use_asynchronous_shaders->setChecked(Settings::values.use_asynchronous_shaders.GetValue()); 32 ui->use_asynchronous_shaders->setChecked(Settings::values.use_asynchronous_shaders.GetValue());
33 ui->use_fast_gpu_time->setChecked(Settings::values.use_fast_gpu_time.GetValue()); 33 ui->use_fast_gpu_time->setChecked(Settings::values.use_fast_gpu_time.GetValue());
34 34
35 if (Settings::configuring_global) { 35 if (Settings::IsConfiguringGlobal()) {
36 ui->gpu_accuracy->setCurrentIndex( 36 ui->gpu_accuracy->setCurrentIndex(
37 static_cast<int>(Settings::values.gpu_accuracy.GetValue())); 37 static_cast<int>(Settings::values.gpu_accuracy.GetValue()));
38 ui->anisotropic_filtering_combobox->setCurrentIndex( 38 ui->anisotropic_filtering_combobox->setCurrentIndex(
@@ -52,9 +52,9 @@ void ConfigureGraphicsAdvanced::ApplyConfiguration() {
52 // Subtract 2 if configuring per-game (separator and "use global configuration" take 2 slots) 52 // Subtract 2 if configuring per-game (separator and "use global configuration" take 2 slots)
53 const auto gpu_accuracy = static_cast<Settings::GPUAccuracy>( 53 const auto gpu_accuracy = static_cast<Settings::GPUAccuracy>(
54 ui->gpu_accuracy->currentIndex() - 54 ui->gpu_accuracy->currentIndex() -
55 ((Settings::configuring_global) ? 0 : ConfigurationShared::USE_GLOBAL_OFFSET)); 55 ((Settings::IsConfiguringGlobal()) ? 0 : ConfigurationShared::USE_GLOBAL_OFFSET));
56 56
57 if (Settings::configuring_global) { 57 if (Settings::IsConfiguringGlobal()) {
58 // Must guard in case of a during-game configuration when set to be game-specific. 58 // Must guard in case of a during-game configuration when set to be game-specific.
59 if (Settings::values.gpu_accuracy.UsingGlobal()) { 59 if (Settings::values.gpu_accuracy.UsingGlobal()) {
60 Settings::values.gpu_accuracy.SetValue(gpu_accuracy); 60 Settings::values.gpu_accuracy.SetValue(gpu_accuracy);
@@ -118,7 +118,7 @@ void ConfigureGraphicsAdvanced::RetranslateUI() {
118 118
119void ConfigureGraphicsAdvanced::SetupPerGameUI() { 119void ConfigureGraphicsAdvanced::SetupPerGameUI() {
120 // Disable if not global (only happens during game) 120 // Disable if not global (only happens during game)
121 if (Settings::configuring_global) { 121 if (Settings::IsConfiguringGlobal()) {
122 ui->gpu_accuracy->setEnabled(Settings::values.gpu_accuracy.UsingGlobal()); 122 ui->gpu_accuracy->setEnabled(Settings::values.gpu_accuracy.UsingGlobal());
123 ui->use_vsync->setEnabled(Settings::values.use_vsync.UsingGlobal()); 123 ui->use_vsync->setEnabled(Settings::values.use_vsync.UsingGlobal());
124 ui->use_assembly_shaders->setEnabled(Settings::values.use_assembly_shaders.UsingGlobal()); 124 ui->use_assembly_shaders->setEnabled(Settings::values.use_assembly_shaders.UsingGlobal());
diff --git a/src/yuzu/configuration/configure_per_game.cpp b/src/yuzu/configuration/configure_per_game.cpp
index 1e49f0787..002db3f93 100644
--- a/src/yuzu/configuration/configure_per_game.cpp
+++ b/src/yuzu/configuration/configure_per_game.cpp
@@ -31,7 +31,7 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id)
31 : QDialog(parent), ui(std::make_unique<Ui::ConfigurePerGame>()), title_id(title_id) { 31 : QDialog(parent), ui(std::make_unique<Ui::ConfigurePerGame>()), title_id(title_id) {
32 game_config = std::make_unique<Config>(fmt::format("{:016X}.ini", title_id), false); 32 game_config = std::make_unique<Config>(fmt::format("{:016X}.ini", title_id), false);
33 33
34 Settings::configuring_global = false; 34 Settings::SetConfiguringGlobal(false);
35 35
36 ui->setupUi(this); 36 ui->setupUi(this);
37 setFocusPolicy(Qt::ClickFocus); 37 setFocusPolicy(Qt::ClickFocus);
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp
index 5e8e201dc..59a58d92c 100644
--- a/src/yuzu/configuration/configure_system.cpp
+++ b/src/yuzu/configuration/configure_system.cpp
@@ -37,8 +37,8 @@ ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::
37 } 37 }
38 }); 38 });
39 39
40 ui->label_console_id->setVisible(Settings::configuring_global); 40 ui->label_console_id->setVisible(Settings::IsConfiguringGlobal());
41 ui->button_regenerate_console_id->setVisible(Settings::configuring_global); 41 ui->button_regenerate_console_id->setVisible(Settings::IsConfiguringGlobal());
42 42
43 SetupPerGameUI(); 43 SetupPerGameUI();
44 44
@@ -78,7 +78,7 @@ void ConfigureSystem::SetConfiguration() {
78 Settings::values.rng_seed.UsingGlobal()); 78 Settings::values.rng_seed.UsingGlobal());
79 ui->custom_rtc_edit->setDateTime(QDateTime::fromSecsSinceEpoch(rtc_time.count())); 79 ui->custom_rtc_edit->setDateTime(QDateTime::fromSecsSinceEpoch(rtc_time.count()));
80 80
81 if (Settings::configuring_global) { 81 if (Settings::IsConfiguringGlobal()) {
82 ui->combo_language->setCurrentIndex(Settings::values.language_index.GetValue()); 82 ui->combo_language->setCurrentIndex(Settings::values.language_index.GetValue());
83 ui->combo_region->setCurrentIndex(Settings::values.region_index.GetValue()); 83 ui->combo_region->setCurrentIndex(Settings::values.region_index.GetValue());
84 ui->combo_time_zone->setCurrentIndex(Settings::values.time_zone_index.GetValue()); 84 ui->combo_time_zone->setCurrentIndex(Settings::values.time_zone_index.GetValue());
@@ -125,7 +125,7 @@ void ConfigureSystem::ApplyConfiguration() {
125 return; 125 return;
126 } 126 }
127 127
128 if (Settings::configuring_global) { 128 if (Settings::IsConfiguringGlobal()) {
129 // Guard if during game and set to game-specific value 129 // Guard if during game and set to game-specific value
130 if (Settings::values.language_index.UsingGlobal()) { 130 if (Settings::values.language_index.UsingGlobal()) {
131 Settings::values.language_index.SetValue(ui->combo_language->currentIndex()); 131 Settings::values.language_index.SetValue(ui->combo_language->currentIndex());
@@ -218,7 +218,7 @@ void ConfigureSystem::RefreshConsoleID() {
218} 218}
219 219
220void ConfigureSystem::SetupPerGameUI() { 220void ConfigureSystem::SetupPerGameUI() {
221 if (Settings::configuring_global) { 221 if (Settings::IsConfiguringGlobal()) {
222 ui->combo_language->setEnabled(Settings::values.language_index.UsingGlobal()); 222 ui->combo_language->setEnabled(Settings::values.language_index.UsingGlobal());
223 ui->combo_region->setEnabled(Settings::values.region_index.UsingGlobal()); 223 ui->combo_region->setEnabled(Settings::values.region_index.UsingGlobal());
224 ui->combo_time_zone->setEnabled(Settings::values.time_zone_index.UsingGlobal()); 224 ui->combo_time_zone->setEnabled(Settings::values.time_zone_index.UsingGlobal());