summaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/configure_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu/configuration/configure_dialog.cpp')
-rw-r--r--src/yuzu/configuration/configure_dialog.cpp27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/yuzu/configuration/configure_dialog.cpp b/src/yuzu/configuration/configure_dialog.cpp
index bdf83ebfe..0ad95cc02 100644
--- a/src/yuzu/configuration/configure_dialog.cpp
+++ b/src/yuzu/configuration/configure_dialog.cpp
@@ -4,6 +4,7 @@
#include <memory>
#include "common/logging/log.h"
#include "common/settings.h"
+#include "common/settings_enums.h"
#include "core/core.h"
#include "ui_configure.h"
#include "vk_device_info.h"
@@ -32,23 +33,28 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
std::vector<VkDeviceInfo::Record>& vk_device_records,
Core::System& system_, bool enable_web_config)
: QDialog(parent), ui{std::make_unique<Ui::ConfigureDialog>()},
- registry(registry_), system{system_}, audio_tab{std::make_unique<ConfigureAudio>(system_,
- this)},
- cpu_tab{std::make_unique<ConfigureCpu>(system_, this)},
+ registry(registry_), system{system_}, builder{std::make_unique<ConfigurationShared::Builder>(
+ this, !system_.IsPoweredOn())},
+ audio_tab{std::make_unique<ConfigureAudio>(system_, nullptr, *builder, this)},
+ cpu_tab{std::make_unique<ConfigureCpu>(system_, nullptr, *builder, this)},
debug_tab_tab{std::make_unique<ConfigureDebugTab>(system_, this)},
filesystem_tab{std::make_unique<ConfigureFilesystem>(this)},
- general_tab{std::make_unique<ConfigureGeneral>(system_, this)},
- graphics_advanced_tab{std::make_unique<ConfigureGraphicsAdvanced>(system_, this)},
+ general_tab{std::make_unique<ConfigureGeneral>(system_, nullptr, *builder, this)},
+ graphics_advanced_tab{
+ std::make_unique<ConfigureGraphicsAdvanced>(system_, nullptr, *builder, this)},
+ ui_tab{std::make_unique<ConfigureUi>(system_, this)},
graphics_tab{std::make_unique<ConfigureGraphics>(
system_, vk_device_records, [&]() { graphics_advanced_tab->ExposeComputeOption(); },
- this)},
+ [this](Settings::AspectRatio ratio, Settings::ResolutionSetup setup) {
+ ui_tab->UpdateScreenshotInfo(ratio, setup);
+ },
+ nullptr, *builder, this)},
hotkeys_tab{std::make_unique<ConfigureHotkeys>(system_.HIDCore(), this)},
input_tab{std::make_unique<ConfigureInput>(system_, this)},
network_tab{std::make_unique<ConfigureNetwork>(system_, this)},
profile_tab{std::make_unique<ConfigureProfileManager>(system_, this)},
- system_tab{std::make_unique<ConfigureSystem>(system_, this)},
- ui_tab{std::make_unique<ConfigureUi>(system_, this)}, web_tab{std::make_unique<ConfigureWeb>(
- this)} {
+ system_tab{std::make_unique<ConfigureSystem>(system_, nullptr, *builder, this)},
+ web_tab{std::make_unique<ConfigureWeb>(this)} {
Settings::SetConfiguringGlobal(true);
ui->setupUi(this);
@@ -95,6 +101,9 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
adjustSize();
ui->selectorList->setCurrentRow(0);
+
+ // Selects the leftmost button on the bottom bar (Cancel as of writing)
+ ui->buttonBox->setFocus();
}
ConfigureDialog::~ConfigureDialog() = default;