mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-24 17:07:56 -05:00
settings: Recategorize a bit
Will help with generating config UI later.
This commit is contained in:
@ -550,6 +550,7 @@ void Config::ReadDebuggingValues() {
|
||||
qt_config->value(QStringLiteral("record_frame_times"), false).toBool();
|
||||
|
||||
ReadCategory(Settings::Category::Debugging);
|
||||
ReadCategory(Settings::Category::DebuggingGraphics);
|
||||
|
||||
qt_config->endGroup();
|
||||
}
|
||||
@ -635,6 +636,8 @@ void Config::ReadCpuValues() {
|
||||
qt_config->beginGroup(QStringLiteral("Cpu"));
|
||||
|
||||
ReadCategory(Settings::Category::Cpu);
|
||||
ReadCategory(Settings::Category::CpuDebug);
|
||||
ReadCategory(Settings::Category::CpuUnsafe);
|
||||
|
||||
if (Settings::values.cpu_accuracy_first_time) {
|
||||
Settings::values.cpu_accuracy.SetValue(Settings::values.cpu_accuracy.GetDefault());
|
||||
@ -648,7 +651,8 @@ void Config::ReadRendererValues() {
|
||||
qt_config->beginGroup(QStringLiteral("Renderer"));
|
||||
|
||||
ReadCategory(Settings::Category::Renderer);
|
||||
ReadCategory(Settings::Category::AdvancedGraphics);
|
||||
ReadCategory(Settings::Category::RendererAdvanced);
|
||||
ReadCategory(Settings::Category::RendererDebug);
|
||||
|
||||
qt_config->endGroup();
|
||||
}
|
||||
@ -1016,6 +1020,7 @@ void Config::SaveDebuggingValues() {
|
||||
qt_config->setValue(QStringLiteral("record_frame_times"), Settings::values.record_frame_times);
|
||||
|
||||
WriteCategory(Settings::Category::Debugging);
|
||||
WriteCategory(Settings::Category::DebuggingGraphics);
|
||||
|
||||
qt_config->endGroup();
|
||||
}
|
||||
@ -1079,6 +1084,8 @@ void Config::SaveCpuValues() {
|
||||
qt_config->beginGroup(QStringLiteral("Cpu"));
|
||||
|
||||
WriteCategory(Settings::Category::Cpu);
|
||||
WriteCategory(Settings::Category::CpuDebug);
|
||||
WriteCategory(Settings::Category::CpuUnsafe);
|
||||
|
||||
qt_config->endGroup();
|
||||
}
|
||||
@ -1086,8 +1093,9 @@ void Config::SaveCpuValues() {
|
||||
void Config::SaveRendererValues() {
|
||||
qt_config->beginGroup(QStringLiteral("Renderer"));
|
||||
|
||||
WriteCategory(Settings::Category::AdvancedGraphics);
|
||||
WriteCategory(Settings::Category::Renderer);
|
||||
WriteCategory(Settings::Category::RendererAdvanced);
|
||||
WriteCategory(Settings::Category::RendererDebug);
|
||||
|
||||
qt_config->endGroup();
|
||||
}
|
||||
|
@ -128,10 +128,16 @@ QWidget* CreateWidget(Settings::BasicSetting* setting, const TranslationMap& tra
|
||||
return std::pair{translations.at(setting_label).first,
|
||||
translations.at(setting_label).second};
|
||||
}
|
||||
LOG_ERROR(Frontend, "Translation map lacks entry for \"{}\"", setting_label);
|
||||
LOG_ERROR(Frontend, "Translation table lacks entry for \"{}\"", setting_label);
|
||||
return std::pair{QString::fromStdString(setting_label), QStringLiteral("")};
|
||||
}();
|
||||
|
||||
if (label == QStringLiteral("")) {
|
||||
LOG_DEBUG(Frontend, "Translation table has emtpy entry for \"{}\", skipping...",
|
||||
setting->GetLabel());
|
||||
return widget;
|
||||
}
|
||||
|
||||
if (type == typeid(bool)) {
|
||||
auto pair = CreateCheckBox(setting, label, parent, trackers);
|
||||
widget = pair.first;
|
||||
|
@ -31,7 +31,7 @@ void ConfigureGraphicsAdvanced::SetConfiguration() {
|
||||
std::map<std::string, QWidget*> hold{}; // A map will sort the data for us
|
||||
|
||||
for (auto setting :
|
||||
Settings::values.linkage.by_category[Settings::Category::AdvancedGraphics]) {
|
||||
Settings::values.linkage.by_category[Settings::Category::RendererAdvanced]) {
|
||||
QWidget* widget = ConfigurationShared::CreateWidget(setting, translations, this,
|
||||
runtime_lock, apply_funcs, trackers);
|
||||
|
||||
|
Reference in New Issue
Block a user