diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-12-29 00:36:37 +0100 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-01-08 01:19:40 +0100 |
commit | 21f1b2889d2d8dc52f406957175d1d10a673128a (patch) | |
tree | 3edc77331c339ff5626a739e48c305d02ec02899 | |
parent | qt: Provide UI to edit custom RTC settings (diff) | |
download | yuzu-21f1b2889d2d8dc52f406957175d1d10a673128a.tar yuzu-21f1b2889d2d8dc52f406957175d1d10a673128a.tar.gz yuzu-21f1b2889d2d8dc52f406957175d1d10a673128a.tar.bz2 yuzu-21f1b2889d2d8dc52f406957175d1d10a673128a.tar.lz yuzu-21f1b2889d2d8dc52f406957175d1d10a673128a.tar.xz yuzu-21f1b2889d2d8dc52f406957175d1d10a673128a.tar.zst yuzu-21f1b2889d2d8dc52f406957175d1d10a673128a.zip |
-rw-r--r-- | src/core/core.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp index fd10199ec..7459c0851 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/software_keyboard.h" #include "video_core/debug_utils/debug_utils.h" @@ -94,6 +95,12 @@ 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()) + .count(); + 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>(); |