diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-10-14 14:12:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-14 14:12:22 -0400 |
commit | b02d662980a401057d2ff7c1522d47f9f6538d81 (patch) | |
tree | 2717ff56b111eb1adfcb712e14ad69f25ab76b68 /src/yuzu/configuration/configure_system.cpp | |
parent | 894b483a0d619c3ceaa79fa0ff4cef6d37301f9c (diff) | |
parent | b6894bfc5b86c2fae0b401f2cfc294a08994781d (diff) |
Merge pull request #6774 from lat9nq/remove-global-yuzu
yuzu qt: Remove global system instances
Diffstat (limited to 'src/yuzu/configuration/configure_system.cpp')
-rw-r--r-- | src/yuzu/configuration/configure_system.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp index 24a67ad46..33eb059a3 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() { |