From a007ac6b9ccc23861f5a5c6967d535220ed794b0 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sun, 7 May 2023 09:48:26 -0400 Subject: configure_graphics_advance: Generate UI at runtime We can iterate through the AdvancedGraphics settings and generate the UI during runtime. This doesn't help runtime efficiency, but it helps a ton in reducing the amount of work a developer needs in order to add a new setting. --- src/yuzu/configuration/configure_dialog.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/yuzu/configuration/configure_dialog.cpp') diff --git a/src/yuzu/configuration/configure_dialog.cpp b/src/yuzu/configuration/configure_dialog.cpp index 2cc9f3621..b3f4764c7 100644 --- a/src/yuzu/configuration/configure_dialog.cpp +++ b/src/yuzu/configuration/configure_dialog.cpp @@ -32,13 +32,15 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_, std::vector& vk_device_records, Core::System& system_, bool enable_web_config) : QDialog(parent), ui{std::make_unique()}, - registry(registry_), system{system_}, audio_tab{std::make_unique( - system_, nullptr, this)}, + registry(registry_), system{system_}, + translations{ConfigurationShared::InitializeTranslations(this)}, + audio_tab{std::make_unique(system_, nullptr, this)}, cpu_tab{std::make_unique(system_, nullptr, this)}, debug_tab_tab{std::make_unique(system_, this)}, filesystem_tab{std::make_unique(this)}, general_tab{std::make_unique(system_, nullptr, this)}, - graphics_advanced_tab{std::make_unique(system_, nullptr, this)}, + graphics_advanced_tab{ + std::make_unique(system_, nullptr, *translations, this)}, graphics_tab{std::make_unique( system_, vk_device_records, [&]() { graphics_advanced_tab->ExposeComputeOption(); }, nullptr, this)}, -- cgit v1.2.3