1
0
Fork 0
forked from suyu/suyu

core: Set custom RTC differential on game boot

This commit is contained in:
Zach Hilman 2018-12-28 18:36:37 -05:00
parent 26c9f12271
commit 21f1b2889d

View file

@ -30,6 +30,7 @@
#include "core/hle/service/sm/sm.h" #include "core/hle/service/sm/sm.h"
#include "core/loader/loader.h" #include "core/loader/loader.h"
#include "core/perf_stats.h" #include "core/perf_stats.h"
#include "core/settings.h"
#include "core/telemetry_session.h" #include "core/telemetry_session.h"
#include "frontend/applets/software_keyboard.h" #include "frontend/applets/software_keyboard.h"
#include "video_core/debug_utils/debug_utils.h" #include "video_core/debug_utils/debug_utils.h"
@ -94,6 +95,12 @@ struct System::Impl {
CoreTiming::Init(); CoreTiming::Init();
kernel.Initialize(); 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. // Create a default fs if one doesn't already exist.
if (virtual_filesystem == nullptr) if (virtual_filesystem == nullptr)
virtual_filesystem = std::make_shared<FileSys::RealVfsFilesystem>(); virtual_filesystem = std::make_shared<FileSys::RealVfsFilesystem>();