diff options
Diffstat (limited to 'src/common/settings_common.h')
-rw-r--r-- | src/common/settings_common.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/common/settings_common.h b/src/common/settings_common.h index 2efb329b0..1800ab10d 100644 --- a/src/common/settings_common.h +++ b/src/common/settings_common.h @@ -12,6 +12,7 @@ namespace Settings { enum class Category : u32 { + Android, Audio, Core, Cpu, @@ -56,6 +57,7 @@ enum Specialization : u8 { Scalar = 5, // Values are continuous Countable = 6, // Can be stepped through Paired = 7, // Another setting is associated with this setting + Radio = 8, // Setting should be presented in a radio group Percentage = (1 << SpecializationAttributeOffset), // Should be represented as a percentage }; @@ -67,6 +69,7 @@ public: explicit Linkage(u32 initial_count = 0); ~Linkage(); std::map<Category, std::vector<BasicSetting*>> by_category{}; + std::map<std::string, Settings::BasicSetting*> by_key{}; std::vector<std::function<void()>> restore_functions{}; u32 count; }; @@ -222,6 +225,16 @@ public: */ [[nodiscard]] virtual constexpr u32 EnumIndex() const = 0; + /** + * @returns True if the underlying type is a floating point storage + */ + [[nodiscard]] virtual constexpr bool IsFloatingPoint() const = 0; + + /** + * @returns True if the underlying type is an integer storage + */ + [[nodiscard]] virtual constexpr bool IsIntegral() const = 0; + /* * Switchable settings */ |