android: Refactor settings to expose more options

In AbstractSetting, this removes the category, androidDefault, and valueAsString properties as they are no longer needed and have replacements. isSwitchable, global, and getValueAsString are all exposed and give better options for working with global/per-game settings.
This commit is contained in:
t895 2023-12-10 20:10:36 -05:00
parent df9e902105
commit 10eee4c0c3
34 changed files with 320 additions and 349 deletions

View file

@ -81,6 +81,9 @@ public:
[[nodiscard]] virtual const Type& GetValue() const {
return value;
}
[[nodiscard]] virtual const Type& GetValue(bool need_global) const {
return value;
}
/**
* Sets the setting to the given value.
@ -353,7 +356,7 @@ public:
}
return custom;
}
[[nodiscard]] const Type& GetValue(bool need_global) const {
[[nodiscard]] const Type& GetValue(bool need_global) const override final {
if (use_global || need_global) {
return this->value;
}