aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/configuration_shared.h
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2022-07-07 01:22:01 -0400
committerGitHub <noreply@github.com>2022-07-07 01:22:01 -0400
commitec4cba9de8649dff65acfeabaf8ff02a89894802 (patch)
treea5874596aec2534712874e7a5d72cf07ae25bac3 /src/yuzu/configuration/configuration_shared.h
parent770611fdf39f274ee9ccde9875e86cfeb79a3f6f (diff)
parentca36722a5431e70c79e2e6d175d3e68e12b90ff5 (diff)
Merge pull request #8522 from lat9nq/consolidate-settings
settings: Consolidate RangedSetting's with regular ones
Diffstat (limited to 'src/yuzu/configuration/configuration_shared.h')
-rw-r--r--src/yuzu/configuration/configuration_shared.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/yuzu/configuration/configuration_shared.h b/src/yuzu/configuration/configuration_shared.h
index 903a9baae..77802a367 100644
--- a/src/yuzu/configuration/configuration_shared.h
+++ b/src/yuzu/configuration/configuration_shared.h
@@ -25,10 +25,10 @@ enum class CheckState {
// Global-aware apply and set functions
// ApplyPerGameSetting, given a Settings::Setting and a Qt UI element, properly applies a Setting
-void ApplyPerGameSetting(Settings::Setting<bool>* setting, const QCheckBox* checkbox,
+void ApplyPerGameSetting(Settings::SwitchableSetting<bool>* setting, const QCheckBox* checkbox,
const CheckState& tracker);
template <typename Type>
-void ApplyPerGameSetting(Settings::Setting<Type>* setting, const QComboBox* combobox) {
+void ApplyPerGameSetting(Settings::SwitchableSetting<Type>* setting, const QComboBox* combobox) {
if (Settings::IsConfiguringGlobal() && setting->UsingGlobal()) {
setting->SetValue(static_cast<Type>(combobox->currentIndex()));
} else if (!Settings::IsConfiguringGlobal()) {
@@ -43,10 +43,10 @@ void ApplyPerGameSetting(Settings::Setting<Type>* setting, const QComboBox* comb
}
// Sets a Qt UI element given a Settings::Setting
-void SetPerGameSetting(QCheckBox* checkbox, const Settings::Setting<bool>* setting);
+void SetPerGameSetting(QCheckBox* checkbox, const Settings::SwitchableSetting<bool>* setting);
template <typename Type>
-void SetPerGameSetting(QComboBox* combobox, const Settings::Setting<Type>* setting) {
+void SetPerGameSetting(QComboBox* combobox, const Settings::SwitchableSetting<Type>* setting) {
combobox->setCurrentIndex(setting->UsingGlobal() ? ConfigurationShared::USE_GLOBAL_INDEX
: static_cast<int>(setting->GetValue()) +
ConfigurationShared::USE_GLOBAL_OFFSET);
@@ -56,7 +56,7 @@ void SetPerGameSetting(QComboBox* combobox, const Settings::Setting<Type>* setti
void SetHighlight(QWidget* widget, bool highlighted);
// Sets up a QCheckBox like a tristate one, given a Setting
-void SetColoredTristate(QCheckBox* checkbox, const Settings::Setting<bool>& setting,
+void SetColoredTristate(QCheckBox* checkbox, const Settings::SwitchableSetting<bool>& setting,
CheckState& tracker);
void SetColoredTristate(QCheckBox* checkbox, bool global, bool state, bool global_state,
CheckState& tracker);