diff options
author | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-06-10 16:40:38 -0400 |
---|---|---|
committer | lat9nq <22451773+lat9nq@users.noreply.github.com> | 2023-07-21 10:56:54 -0400 |
commit | 79024bb9554ba676a654ff76335008e37181be1c (patch) | |
tree | a808269c725a2d3c8d310503133213e528dd66be /src/yuzu/configuration/configure_graphics.cpp | |
parent | c5f8b909ecee8d58b86b3e70e5e6defe56d4780c (diff) |
FIXME configuration: Avoid unnecessary allocations
ConfigurationShared::Widget needs to be created with a builder. This
would avoid some duplicated code.
Diffstat (limited to 'src/yuzu/configuration/configure_graphics.cpp')
-rw-r--r-- | src/yuzu/configuration/configure_graphics.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index 4d638a11bf..9afab6d912 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp @@ -231,6 +231,10 @@ void ConfigureGraphics::Setup() { std::forward_list<QWidget*> hold_api; for (const auto setting : Settings::values.linkage.by_category[Settings::Category::Renderer]) { + if (!Settings::IsConfiguringGlobal() && !setting->Switchable()) { + continue; + } + ConfigurationShared::Widget* widget = [&]() { // Set managed to false on these and set up the comboboxes ourselves if (setting->Id() == Settings::values.vulkan_device.Id() || @@ -273,8 +277,8 @@ void ConfigureGraphics::Setup() { [=](bool) { UpdateAPILayout(); }); // Detach API's restore button and place it where we want - // Lets us put it on the side, and it will automatically scale if there's a second - // combobox (shader_backend, vulkan_device) + // Lets us put it on the side, and it will automatically scale if there's a + // second combobox (shader_backend, vulkan_device) widget->layout()->removeWidget(api_restore_global_button); api_layout->addWidget(api_restore_global_button); } |