diff options
| author | bunnei <bunneidev@gmail.com> | 2019-01-10 17:05:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-10 17:05:21 -0500 |
| commit | b75c0bcec0a946923b1c03356d60f82b79ec8a51 (patch) | |
| tree | 157da486e44b5f7083607159e1bb8bb3e4f20842 /src/core/core.cpp | |
| parent | ea894adaf52044f58eda1c16be4ba32560aeec4a (diff) | |
| parent | d73f33373b43afa1ddf2375ad0e6360bc4e979c2 (diff) | |
Merge pull request #1959 from DarkLordZach/custom-rtc
settings: Add support for setting the RTC manually
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index 7151727710..31c5908669 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -30,6 +30,7 @@ #include "core/hle/service/sm/sm.h" #include "core/loader/loader.h" #include "core/perf_stats.h" +#include "core/settings.h" #include "core/telemetry_session.h" #include "frontend/applets/profile_select.h" #include "frontend/applets/software_keyboard.h" @@ -96,6 +97,11 @@ struct System::Impl { CoreTiming::Init(); kernel.Initialize(); + const auto current_time = std::chrono::duration_cast<std::chrono::seconds>( + std::chrono::system_clock::now().time_since_epoch()); + Settings::values.custom_rtc_differential = + Settings::values.custom_rtc.value_or(current_time) - current_time; + // Create a default fs if one doesn't already exist. if (virtual_filesystem == nullptr) virtual_filesystem = std::make_shared<FileSys::RealVfsFilesystem>(); |
