diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-06-21 21:38:30 +0200 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-07-21 16:56:55 +0200 |
commit | 54d58130a0818efc4d70d72624f734f2b6f0a6d3 (patch) | |
tree | 9dea11d8089ac816509140b7e4502b7b5b86f1ac /src/common/settings_setting.h | |
parent | settings,configuration: Add a default suffix (diff) | |
download | yuzu-54d58130a0818efc4d70d72624f734f2b6f0a6d3.tar yuzu-54d58130a0818efc4d70d72624f734f2b6f0a6d3.tar.gz yuzu-54d58130a0818efc4d70d72624f734f2b6f0a6d3.tar.bz2 yuzu-54d58130a0818efc4d70d72624f734f2b6f0a6d3.tar.lz yuzu-54d58130a0818efc4d70d72624f734f2b6f0a6d3.tar.xz yuzu-54d58130a0818efc4d70d72624f734f2b6f0a6d3.tar.zst yuzu-54d58130a0818efc4d70d72624f734f2b6f0a6d3.zip |
Diffstat (limited to 'src/common/settings_setting.h')
-rw-r--r-- | src/common/settings_setting.h | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/common/settings_setting.h b/src/common/settings_setting.h index d1915cb43..eb46b2b6d 100644 --- a/src/common/settings_setting.h +++ b/src/common/settings_setting.h @@ -35,12 +35,12 @@ public: * @param category_ Category of the setting AKA INI group */ explicit Setting(Linkage& linkage, const Type& default_val, const std::string& name, - enum Category category_, u32 specialization = Specialization::Default, + enum Category category_, u32 specialization_ = Specialization::Default, bool save_ = true, bool runtime_modifiable_ = false, - BasicSetting* other_setting = nullptr) + BasicSetting* other_setting_ = nullptr) requires(!ranged) - : BasicSetting(linkage, name, category_, save_, runtime_modifiable_, specialization, - other_setting), + : BasicSetting(linkage, name, category_, save_, runtime_modifiable_, specialization_, + other_setting_), value{default_val}, default_value{default_val} {} virtual ~Setting() = default; @@ -56,11 +56,11 @@ public: */ explicit Setting(Linkage& linkage, const Type& default_val, const Type& min_val, const Type& max_val, const std::string& name, enum Category category_, - u32 specialization = Specialization::Default, bool save_ = true, - bool runtime_modifiable_ = false, BasicSetting* other_setting = nullptr) + u32 specialization_ = Specialization::Default, bool save_ = true, + bool runtime_modifiable_ = false, BasicSetting* other_setting_ = nullptr) requires(ranged) - : BasicSetting(linkage, name, category_, save_, runtime_modifiable_, specialization, - other_setting), + : BasicSetting(linkage, name, category_, save_, runtime_modifiable_, specialization_, + other_setting_), value{default_val}, default_value{default_val}, maximum{max_val}, minimum{min_val} {} /** @@ -235,13 +235,13 @@ public: * @param category_ Category of the setting AKA INI group */ explicit SwitchableSetting(Linkage& linkage, const Type& default_val, const std::string& name, - Category category_, u32 specialization = Specialization::Default, + Category category_, u32 specialization_ = Specialization::Default, bool save_ = true, bool runtime_modifiable_ = false, - BasicSetting* other_setting = nullptr) + BasicSetting* other_setting_ = nullptr) requires(!ranged) : Setting<Type, false>{ - linkage, default_val, name, category_, specialization, - save_, runtime_modifiable_, other_setting} { + linkage, default_val, name, category_, specialization_, + save_, runtime_modifiable_, other_setting_} { linkage.restore_functions.emplace_back([this]() { this->SetGlobal(true); }); } virtual ~SwitchableSetting() = default; @@ -258,13 +258,14 @@ public: */ explicit SwitchableSetting(Linkage& linkage, const Type& default_val, const Type& min_val, const Type& max_val, const std::string& name, Category category_, - u32 specialization = Specialization::Default, bool save_ = true, + u32 specialization_ = Specialization::Default, bool save_ = true, bool runtime_modifiable_ = false, - BasicSetting* other_setting = nullptr) + BasicSetting* other_setting_ = nullptr) requires(ranged) - : Setting<Type, true>{ - linkage, default_val, min_val, max_val, name, category_, specialization, - save_, runtime_modifiable_, other_setting} { + : Setting<Type, true>{linkage, default_val, min_val, + max_val, name, category_, + specialization_, save_, runtime_modifiable_, + other_setting_} { linkage.restore_functions.emplace_back([this]() { this->SetGlobal(true); }); } |