summaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/configure_system.cpp
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2023-06-09 16:53:26 -0400
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2023-07-21 10:56:07 -0400
commit4ff8255e4a985e69046e453a9bd38adf80346548 (patch)
tree9d665f43b79639047e11dfda63f4036885619204 /src/yuzu/configuration/configure_system.cpp
parent4c4bc134a90a248435786b1dff4f514d1c9c4464 (diff)
shared_widget: Refactor helpers
Makes checkbox creation an option as opposed to a label.
Diffstat (limited to 'src/yuzu/configuration/configure_system.cpp')
-rw-r--r--src/yuzu/configuration/configure_system.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp
index dedbad57f..128860800 100644
--- a/src/yuzu/configuration/configure_system.cpp
+++ b/src/yuzu/configuration/configure_system.cpp
@@ -117,17 +117,18 @@ void ConfigureSystem::Setup() {
push(Settings::values.linkage.by_category[Settings::Category::System]);
for (auto setting : settings) {
+ [[maybe_unused]] std::string label = setting->GetLabel();
ConfigurationShared::Widget* widget = [=]() {
- if (setting->Id() == Settings::values.custom_rtc_enabled.Id()) {
+ if (setting->Id() == Settings::values.custom_rtc.Id()) {
return new ConfigurationShared::Widget(
setting, translations, this, runtime_lock, apply_funcs,
ConfigurationShared::RequestType::DateTimeEdit, true, 1.0f,
- &Settings::values.custom_rtc);
- } else if (setting->Id() == Settings::values.rng_seed_enabled.Id()) {
- return new ConfigurationShared::Widget(setting, translations, this, runtime_lock,
- apply_funcs,
- ConfigurationShared::RequestType::HexEdit,
- true, 1.0f, &Settings::values.rng_seed);
+ &Settings::values.custom_rtc_enabled);
+ } else if (setting->Id() == Settings::values.rng_seed.Id()) {
+ return new ConfigurationShared::Widget(
+ setting, translations, this, runtime_lock, apply_funcs,
+ ConfigurationShared::RequestType::HexEdit, true, 1.0f,
+ &Settings::values.rng_seed_enabled);
} else {
return new ConfigurationShared::Widget(setting, translations, this, runtime_lock,
@@ -140,14 +141,12 @@ void ConfigureSystem::Setup() {
continue;
}
- if (setting->Id() == Settings::values.rng_seed_enabled.Id()) {
+ if (setting->Id() == Settings::values.rng_seed.Id()) {
rng_seed_checkbox = widget->checkbox;
rng_seed_edit = widget->line_edit;
- if (!Settings::values.rng_seed_enabled.GetValue()) {
- rng_seed_edit->setEnabled(false);
- }
- } else if (setting->Id() == Settings::values.custom_rtc_enabled.Id()) {
+ rng_seed_edit->setEnabled(Settings::values.rng_seed_enabled.GetValue());
+ } else if (setting->Id() == Settings::values.custom_rtc.Id()) {
custom_rtc_checkbox = widget->checkbox;
custom_rtc_edit = widget->date_time_edit;