summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd
diff options
context:
space:
mode:
authorGravatar bunnei2022-07-16 15:32:52 -0700
committerGravatar GitHub2022-07-16 15:32:52 -0700
commit7d66f8339e4243c74c54b43cfbc3e944fbecb3e8 (patch)
tree87768226bd5f30bc8b980eb07ef6f94b6878c5c5 /src/yuzu_cmd
parentMerge pull request #8594 from liamwhite/skip-wp (diff)
parentcommon/setting: Make ranged a property of the type (diff)
downloadyuzu-7d66f8339e4243c74c54b43cfbc3e944fbecb3e8.tar.gz
yuzu-7d66f8339e4243c74c54b43cfbc3e944fbecb3e8.tar.xz
yuzu-7d66f8339e4243c74c54b43cfbc3e944fbecb3e8.zip
Merge pull request #8593 from merryhime/ranged-setting-T
common/setting: Make ranged a property of the type
Diffstat (limited to 'src/yuzu_cmd')
-rw-r--r--src/yuzu_cmd/config.cpp4
-rw-r--r--src/yuzu_cmd/config.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp
index 903e02297..9db7115a2 100644
--- a/src/yuzu_cmd/config.cpp
+++ b/src/yuzu_cmd/config.cpp
@@ -99,8 +99,8 @@ void Config::ReadSetting(const std::string& group, Settings::Setting<bool>& sett
99 setting = sdl2_config->GetBoolean(group, setting.GetLabel(), setting.GetDefault()); 99 setting = sdl2_config->GetBoolean(group, setting.GetLabel(), setting.GetDefault());
100} 100}
101 101
102template <typename Type> 102template <typename Type, bool ranged>
103void Config::ReadSetting(const std::string& group, Settings::Setting<Type>& setting) { 103void Config::ReadSetting(const std::string& group, Settings::Setting<Type, ranged>& setting) {
104 setting = static_cast<Type>(sdl2_config->GetInteger(group, setting.GetLabel(), 104 setting = static_cast<Type>(sdl2_config->GetInteger(group, setting.GetLabel(),
105 static_cast<long>(setting.GetDefault()))); 105 static_cast<long>(setting.GetDefault())));
106} 106}
diff --git a/src/yuzu_cmd/config.h b/src/yuzu_cmd/config.h
index ccf77d668..32c03075f 100644
--- a/src/yuzu_cmd/config.h
+++ b/src/yuzu_cmd/config.h
@@ -33,6 +33,6 @@ private:
33 * @param group The name of the INI group 33 * @param group The name of the INI group
34 * @param setting The yuzu setting to modify 34 * @param setting The yuzu setting to modify
35 */ 35 */
36 template <typename Type> 36 template <typename Type, bool ranged>
37 void ReadSetting(const std::string& group, Settings::Setting<Type>& setting); 37 void ReadSetting(const std::string& group, Settings::Setting<Type, ranged>& setting);
38}; 38};