From fb66a455c4c7c1e196fc1001a52325a33e50b127 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Thu, 2 Sep 2021 21:40:55 -0400 Subject: yuzu qt: Remove global system instances from config, WaitTree, main --- src/yuzu/configuration/configure_system.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/yuzu/configuration/configure_system.cpp') diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp index 99a5df241..a405e05ca 100644 --- a/src/yuzu/configuration/configure_system.cpp +++ b/src/yuzu/configuration/configure_system.cpp @@ -17,7 +17,8 @@ #include "yuzu/configuration/configuration_shared.h" #include "yuzu/configuration/configure_system.h" -ConfigureSystem::ConfigureSystem(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureSystem) { +ConfigureSystem::ConfigureSystem(Core::System& system_, QWidget* parent) + : QWidget(parent), ui(new Ui::ConfigureSystem), system{system_} { ui->setupUi(this); connect(ui->button_regenerate_console_id, &QPushButton::clicked, this, &ConfigureSystem::RefreshConsoleID); @@ -59,7 +60,7 @@ void ConfigureSystem::RetranslateUI() { } void ConfigureSystem::SetConfiguration() { - enabled = !Core::System::GetInstance().IsPoweredOn(); + enabled = !system.IsPoweredOn(); const auto rng_seed = QStringLiteral("%1") .arg(Settings::values.rng_seed.GetValue().value_or(0), 8, 16, QLatin1Char{'0'}) @@ -103,8 +104,6 @@ void ConfigureSystem::SetConfiguration() { void ConfigureSystem::ReadSystemSettings() {} void ConfigureSystem::ApplyConfiguration() { - auto& system = Core::System::GetInstance(); - // Allow setting custom RTC even if system is powered on, // to allow in-game time to be fast forwarded if (Settings::IsConfiguringGlobal()) { @@ -162,8 +161,6 @@ void ConfigureSystem::ApplyConfiguration() { break; } } - - system.ApplySettings(); } void ConfigureSystem::RefreshConsoleID() { -- cgit v1.2.3