aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/configure_system.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-11-27 10:50:48 -0500
committerLioncash <mathew1800@gmail.com>2020-11-27 11:40:45 -0500
commit5bc4eabe36b7ef4dcd5ad8db1e944705655be432 (patch)
tree285ffb3801aa773cb3537f77153a9e432390f6b8 /src/yuzu/configuration/configure_system.cpp
parentf397edff0ea6711bac15cfe47a0157e9b790b8bb (diff)
core: Eliminate remaining usages of the global system instance
Removes all remaining usages of the global system instance. After this, migration can begin to migrate to being constructed and managed entirely by the various frontends.
Diffstat (limited to 'src/yuzu/configuration/configure_system.cpp')
-rw-r--r--src/yuzu/configuration/configure_system.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp
index 59a58d92cd..6cf2032da0 100644
--- a/src/yuzu/configuration/configure_system.cpp
+++ b/src/yuzu/configuration/configure_system.cpp
@@ -105,16 +105,18 @@ void ConfigureSystem::SetConfiguration() {
void ConfigureSystem::ReadSystemSettings() {}
void ConfigureSystem::ApplyConfiguration() {
- // Allow setting custom RTC even if system is powered on, to allow in-game time to be fast
- // forwared
+ 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::values.custom_rtc.UsingGlobal()) {
if (ui->custom_rtc_checkbox->isChecked()) {
Settings::values.custom_rtc.SetValue(
std::chrono::seconds(ui->custom_rtc_edit->dateTime().toSecsSinceEpoch()));
- if (Core::System::GetInstance().IsPoweredOn()) {
+ if (system.IsPoweredOn()) {
const s64 posix_time{Settings::values.custom_rtc.GetValue()->count() +
Service::Time::TimeManager::GetExternalTimeZoneOffset()};
- Core::System::GetInstance().GetTimeManager().UpdateLocalSystemClockTime(posix_time);
+ system.GetTimeManager().UpdateLocalSystemClockTime(posix_time);
}
} else {
Settings::values.custom_rtc.SetValue(std::nullopt);
@@ -197,7 +199,7 @@ void ConfigureSystem::ApplyConfiguration() {
}
}
- Settings::Apply();
+ Settings::Apply(system);
}
void ConfigureSystem::RefreshConsoleID() {