diff options
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/settings.cpp | 2 | ||||
| -rw-r--r-- | src/common/settings_common.cpp | 1 | ||||
| -rw-r--r-- | src/common/settings_common.h | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 524056841..4ecaf550b 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp | |||
| @@ -159,6 +159,8 @@ float Volume() { | |||
| 159 | 159 | ||
| 160 | const char* TranslateCategory(Category category) { | 160 | const char* TranslateCategory(Category category) { |
| 161 | switch (category) { | 161 | switch (category) { |
| 162 | case Category::Android: | ||
| 163 | return "Android"; | ||
| 162 | case Category::Audio: | 164 | case Category::Audio: |
| 163 | return "Audio"; | 165 | return "Audio"; |
| 164 | case Category::Core: | 166 | case Category::Core: |
diff --git a/src/common/settings_common.cpp b/src/common/settings_common.cpp index 137b65d5f..5960b78aa 100644 --- a/src/common/settings_common.cpp +++ b/src/common/settings_common.cpp | |||
| @@ -14,6 +14,7 @@ BasicSetting::BasicSetting(Linkage& linkage, const std::string& name, enum Categ | |||
| 14 | : label{name}, category{category_}, id{linkage.count}, save{save_}, | 14 | : label{name}, category{category_}, id{linkage.count}, save{save_}, |
| 15 | runtime_modifiable{runtime_modifiable_}, specialization{specialization_}, | 15 | runtime_modifiable{runtime_modifiable_}, specialization{specialization_}, |
| 16 | other_setting{other_setting_} { | 16 | other_setting{other_setting_} { |
| 17 | linkage.by_key.insert({name, this}); | ||
| 17 | linkage.by_category[category].push_back(this); | 18 | linkage.by_category[category].push_back(this); |
| 18 | linkage.count++; | 19 | linkage.count++; |
| 19 | } | 20 | } |
diff --git a/src/common/settings_common.h b/src/common/settings_common.h index 3082e0ce1..5b170dfd5 100644 --- a/src/common/settings_common.h +++ b/src/common/settings_common.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | namespace Settings { | 12 | namespace Settings { |
| 13 | 13 | ||
| 14 | enum class Category : u32 { | 14 | enum class Category : u32 { |
| 15 | Android, | ||
| 15 | Audio, | 16 | Audio, |
| 16 | Core, | 17 | Core, |
| 17 | Cpu, | 18 | Cpu, |
| @@ -68,6 +69,7 @@ public: | |||
| 68 | explicit Linkage(u32 initial_count = 0); | 69 | explicit Linkage(u32 initial_count = 0); |
| 69 | ~Linkage(); | 70 | ~Linkage(); |
| 70 | std::map<Category, std::vector<BasicSetting*>> by_category{}; | 71 | std::map<Category, std::vector<BasicSetting*>> by_category{}; |
| 72 | std::map<std::string, Settings::BasicSetting*> by_key{}; | ||
| 71 | std::vector<std::function<void()>> restore_functions{}; | 73 | std::vector<std::function<void()>> restore_functions{}; |
| 72 | u32 count; | 74 | u32 count; |
| 73 | }; | 75 | }; |