aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/configure_per_game.cpp
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2023-05-07 09:48:26 -0400
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2023-07-21 10:56:07 -0400
commita007ac6b9ccc23861f5a5c6967d535220ed794b0 (patch)
tree934c66c124dd77a17fae07ae919335efb1107255 /src/yuzu/configuration/configure_per_game.cpp
parentb11b4be7cb764bc0c1aa6c563ccf41a3d1b335dd (diff)
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.
Diffstat (limited to 'src/yuzu/configuration/configure_per_game.cpp')
-rw-r--r--src/yuzu/configuration/configure_per_game.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/yuzu/configuration/configure_per_game.cpp b/src/yuzu/configuration/configure_per_game.cpp
index 7ec0bf9d3..339768017 100644
--- a/src/yuzu/configuration/configure_per_game.cpp
+++ b/src/yuzu/configuration/configure_per_game.cpp
@@ -41,8 +41,10 @@
ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::string& file_name,
std::vector<VkDeviceInfo::Record>& vk_device_records,
Core::System& system_)
- : QDialog(parent), ui(std::make_unique<Ui::ConfigurePerGame>()), title_id{title_id_},
- system{system_}, tab_group{std::make_shared<std::forward_list<ConfigurationShared::Tab*>>()} {
+ : QDialog(parent),
+ ui(std::make_unique<Ui::ConfigurePerGame>()), title_id{title_id_}, system{system_},
+ translations{ConfigurationShared::InitializeTranslations(this)},
+ tab_group{std::make_shared<std::forward_list<ConfigurationShared::Tab*>>()} {
const auto file_path = std::filesystem::path(Common::FS::ToU8String(file_name));
const auto config_file_name = title_id == 0 ? Common::FS::PathToUTF8String(file_path.filename())
: fmt::format("{:016X}", title_id);
@@ -52,7 +54,8 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::st
audio_tab = std::make_unique<ConfigureAudio>(system_, tab_group, this);
cpu_tab = std::make_unique<ConfigureCpu>(system_, tab_group, this);
general_tab = std::make_unique<ConfigureGeneral>(system_, tab_group, this);
- graphics_advanced_tab = std::make_unique<ConfigureGraphicsAdvanced>(system_, tab_group, this);
+ graphics_advanced_tab =
+ std::make_unique<ConfigureGraphicsAdvanced>(system_, tab_group, *translations, this);
graphics_tab = std::make_unique<ConfigureGraphics>(
system_, vk_device_records, [&]() { graphics_advanced_tab->ExposeComputeOption(); },
tab_group, this);