early-access version 3847

This commit is contained in:
pineappleEA
2023-08-30 06:16:59 +02:00
parent 748fe8de5e
commit a6a167124f
65 changed files with 2229 additions and 1727 deletions

View File

@@ -163,6 +163,8 @@ float Volume() {
const char* TranslateCategory(Category category) {
switch (category) {
case Category::Android:
return "Android";
case Category::Audio:
return "Audio";
case Category::Core:

View File

@@ -14,6 +14,7 @@ BasicSetting::BasicSetting(Linkage& linkage, const std::string& name, enum Categ
: label{name}, category{category_}, id{linkage.count}, save{save_},
runtime_modifiable{runtime_modifiable_}, specialization{specialization_},
other_setting{other_setting_} {
linkage.by_key.insert({name, this});
linkage.by_category[category].push_back(this);
linkage.count++;
}

View File

@@ -12,6 +12,7 @@
namespace Settings {
enum class Category : u32 {
Android,
Audio,
Core,
Cpu,
@@ -68,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;
};