From b91b76df4fe27d781bd95ddb89b78ff54df57029 Mon Sep 17 00:00:00 2001
From: lat9nq <22451773+lat9nq@users.noreply.github.com>
Date: Mon, 28 Jun 2021 15:58:16 -0400
Subject: general: Make most settings a BasicSetting

Creates a new BasicSettings class in common/settings, and forces setting
a default and label for each setting that uses it in common/settings.
Moves defaults and labels from both frontends into common settings.
Creates a helper function in each frontend to facillitate reading the
settings now with the new default and label properties.

Settings::Setting is also now a subclass of Settings::BasicSetting. Also
adds documentation for both Setting and BasicSetting.
---
 src/yuzu/configuration/configure_debug.cpp | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

(limited to 'src/yuzu/configuration/configure_debug.cpp')

diff --git a/src/yuzu/configuration/configure_debug.cpp b/src/yuzu/configuration/configure_debug.cpp
index 15d6a5ad79..7d15d54b8b 100644
--- a/src/yuzu/configuration/configure_debug.cpp
+++ b/src/yuzu/configuration/configure_debug.cpp
@@ -32,19 +32,20 @@ void ConfigureDebug::SetConfiguration() {
 
     ui->toggle_console->setEnabled(runtime_lock);
     ui->toggle_console->setChecked(UISettings::values.show_console);
-    ui->log_filter_edit->setText(QString::fromStdString(Settings::values.log_filter));
-    ui->homebrew_args_edit->setText(QString::fromStdString(Settings::values.program_args));
+    ui->log_filter_edit->setText(QString::fromStdString(Settings::values.log_filter.GetValue()));
+    ui->homebrew_args_edit->setText(
+        QString::fromStdString(Settings::values.program_args.GetValue()));
     ui->fs_access_log->setEnabled(runtime_lock);
-    ui->fs_access_log->setChecked(Settings::values.enable_fs_access_log);
-    ui->reporting_services->setChecked(Settings::values.reporting_services);
-    ui->quest_flag->setChecked(Settings::values.quest_flag);
-    ui->use_debug_asserts->setChecked(Settings::values.use_debug_asserts);
-    ui->use_auto_stub->setChecked(Settings::values.use_auto_stub);
+    ui->fs_access_log->setChecked(Settings::values.enable_fs_access_log.GetValue());
+    ui->reporting_services->setChecked(Settings::values.reporting_services.GetValue());
+    ui->quest_flag->setChecked(Settings::values.quest_flag.GetValue());
+    ui->use_debug_asserts->setChecked(Settings::values.use_debug_asserts.GetValue());
+    ui->use_auto_stub->setChecked(Settings::values.use_auto_stub.GetValue());
     ui->enable_graphics_debugging->setEnabled(runtime_lock);
-    ui->enable_graphics_debugging->setChecked(Settings::values.renderer_debug);
+    ui->enable_graphics_debugging->setChecked(Settings::values.renderer_debug.GetValue());
     ui->disable_macro_jit->setEnabled(runtime_lock);
-    ui->disable_macro_jit->setChecked(Settings::values.disable_macro_jit);
-    ui->extended_logging->setChecked(Settings::values.extended_logging);
+    ui->disable_macro_jit->setChecked(Settings::values.disable_macro_jit.GetValue());
+    ui->extended_logging->setChecked(Settings::values.extended_logging.GetValue());
 }
 
 void ConfigureDebug::ApplyConfiguration() {
@@ -61,7 +62,7 @@ void ConfigureDebug::ApplyConfiguration() {
     Settings::values.extended_logging = ui->extended_logging->isChecked();
     Debugger::ToggleConsole();
     Common::Log::Filter filter;
-    filter.ParseFilterString(Settings::values.log_filter);
+    filter.ParseFilterString(Settings::values.log_filter.GetValue());
     Common::Log::SetGlobalFilter(filter);
 }
 
-- 
cgit v1.2.3-70-g09d2