diff options
Diffstat (limited to '')
| -rw-r--r-- | src/yuzu/configuration/configure_system.cpp | 14 | ||||
| -rw-r--r-- | src/yuzu/configuration/shared_widget.cpp | 4 |
2 files changed, 6 insertions, 12 deletions
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp index ef26fb6ce..cb708051e 100644 --- a/src/yuzu/configuration/configure_system.cpp +++ b/src/yuzu/configuration/configure_system.cpp | |||
| @@ -107,18 +107,8 @@ void ConfigureSystem::Setup(const ConfigurationShared::Builder& builder) { | |||
| 107 | 107 | ||
| 108 | for (auto setting : settings) { | 108 | for (auto setting : settings) { |
| 109 | ConfigurationShared::Widget* widget = [this, setting, &builder]() { | 109 | ConfigurationShared::Widget* widget = [this, setting, &builder]() { |
| 110 | if (setting->Id() == Settings::values.custom_rtc.Id()) { | 110 | if (setting->Id() == Settings::values.speed_limit.Id()) { |
| 111 | // custom_rtc needs a DateTimeEdit (default is LineEdit), and a checkbox to manage | 111 | // speed_limit must be specified to translate the percentage |
| 112 | // it and custom_rtc_enabled | ||
| 113 | return builder.BuildWidget(setting, apply_funcs, | ||
| 114 | &Settings::values.custom_rtc_enabled); | ||
| 115 | } else if (setting->Id() == Settings::values.rng_seed.Id()) { | ||
| 116 | // rng_seed needs a HexEdit (default is LineEdit), and a checkbox to manage | ||
| 117 | // it and rng_seed_enabled | ||
| 118 | return builder.BuildWidget(setting, apply_funcs, | ||
| 119 | &Settings::values.rng_seed_enabled); | ||
| 120 | } else if (setting->Id() == Settings::values.speed_limit.Id()) { | ||
| 121 | // speed_limit needs a checkbox to set use_speed_limit, as well as a spinbox | ||
| 122 | return builder.BuildWidget(setting, apply_funcs, &Settings::values.use_speed_limit, | 112 | return builder.BuildWidget(setting, apply_funcs, &Settings::values.use_speed_limit, |
| 123 | ConfigurationShared::RequestType::SpinBox, | 113 | ConfigurationShared::RequestType::SpinBox, |
| 124 | tr("%", "Limit speed percentage (e.g. 50%)")); | 114 | tr("%", "Limit speed percentage (e.g. 50%)")); |
diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp index 7670475be..bbcee7488 100644 --- a/src/yuzu/configuration/shared_widget.cpp +++ b/src/yuzu/configuration/shared_widget.cpp | |||
| @@ -345,6 +345,10 @@ void Widget::SetupComponent(const QString& label, std::function<void()>& load_fu | |||
| 345 | QLayout* layout = new QHBoxLayout(this); | 345 | QLayout* layout = new QHBoxLayout(this); |
| 346 | layout->setContentsMargins(0, 0, 0, 0); | 346 | layout->setContentsMargins(0, 0, 0, 0); |
| 347 | 347 | ||
| 348 | if (other_setting == nullptr) { | ||
| 349 | other_setting = setting.PairedSetting(); | ||
| 350 | } | ||
| 351 | |||
| 348 | const bool require_checkbox = | 352 | const bool require_checkbox = |
| 349 | other_setting != nullptr && other_setting->TypeId() == typeid(bool); | 353 | other_setting != nullptr && other_setting->TypeId() == typeid(bool); |
| 350 | 354 | ||