summaryrefslogtreecommitdiff
path: root/src/yuzu/configuration/configure_system.cpp
diff options
context:
space:
mode:
authorRodrigo Locatti <reinuseslisp@airmail.cc>2020-11-27 19:29:59 -0300
committerGitHub <noreply@github.com>2020-11-27 19:29:59 -0300
commit1dbe39f7a25357b40541ca536698cb09bb7df4ff (patch)
tree285ffb3801aa773cb3537f77153a9e432390f6b8 /src/yuzu/configuration/configure_system.cpp
parentf397edff0ea6711bac15cfe47a0157e9b790b8bb (diff)
parent5bc4eabe36b7ef4dcd5ad8db1e944705655be432 (diff)
Merge pull request #5028 from lioncash/final-system
core: Eliminate remaining usages of the global system instance
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 59a58d92c..6cf2032da 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() {