mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-12 08:27:58 -05:00
settings: Consolidate RangedSetting's with regular ones
The latest git version of GCC has issues with my diamond inheritance shenanigans. Since that's now two compilers that don't like it I thought it'd be best to just axe all of it and just have the two templates like before. This rolls the features of BasicRangedSetting into BasicSetting, and likewise RangedSetting into Setting. It also renames them from BasicSetting and Setting to Setting and SwitchableSetting respectively. Now longer name corresponds to more complex thing.
This commit is contained in:
@ -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())));
|
||||
}
|
||||
|
Reference in New Issue
Block a user