diff options
| author | Morph <39850852+Morph1984@users.noreply.github.com> | 2022-07-07 01:22:01 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-07 01:22:01 -0400 |
| commit | ec4cba9de8649dff65acfeabaf8ff02a89894802 (patch) | |
| tree | a5874596aec2534712874e7a5d72cf07ae25bac3 /src/yuzu_cmd | |
| parent | 770611fdf39f274ee9ccde9875e86cfeb79a3f6f (diff) | |
| parent | ca36722a5431e70c79e2e6d175d3e68e12b90ff5 (diff) | |
Merge pull request #8522 from lat9nq/consolidate-settings
settings: Consolidate RangedSetting's with regular ones
Diffstat (limited to 'src/yuzu_cmd')
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 6 | ||||
| -rw-r--r-- | src/yuzu_cmd/config.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index fc4744fb0..903e02297 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp @@ -90,17 +90,17 @@ static const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> }}; template <> -void Config::ReadSetting(const std::string& group, Settings::BasicSetting<std::string>& setting) { +void Config::ReadSetting(const std::string& group, Settings::Setting<std::string>& setting) { setting = sdl2_config->Get(group, setting.GetLabel(), setting.GetDefault()); } template <> -void Config::ReadSetting(const std::string& group, Settings::BasicSetting<bool>& setting) { +void Config::ReadSetting(const std::string& group, Settings::Setting<bool>& setting) { setting = sdl2_config->GetBoolean(group, setting.GetLabel(), setting.GetDefault()); } template <typename Type> -void Config::ReadSetting(const std::string& group, Settings::BasicSetting<Type>& setting) { +void Config::ReadSetting(const std::string& group, Settings::Setting<Type>& setting) { setting = static_cast<Type>(sdl2_config->GetInteger(group, setting.GetLabel(), static_cast<long>(setting.GetDefault()))); } diff --git a/src/yuzu_cmd/config.h b/src/yuzu_cmd/config.h index f61ba23ec..ccf77d668 100644 --- a/src/yuzu_cmd/config.h +++ b/src/yuzu_cmd/config.h @@ -28,11 +28,11 @@ public: private: /** - * Applies a value read from the sdl2_config to a BasicSetting. + * Applies a value read from the sdl2_config to a Setting. * * @param group The name of the INI group * @param setting The yuzu setting to modify */ template <typename Type> - void ReadSetting(const std::string& group, Settings::BasicSetting<Type>& setting); + void ReadSetting(const std::string& group, Settings::Setting<Type>& setting); }; |
