From 2283fccc1bb09e8d1266ffb60d7696f97dfddd17 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Thu, 8 Apr 2021 13:26:38 -0400 Subject: service: time: Setup the network clock with the local clock context Setting the network time allows some time based events using the network clock to not reset. --- src/core/hle/service/time/time_manager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/core/hle/service/time/time_manager.cpp') diff --git a/src/core/hle/service/time/time_manager.cpp b/src/core/hle/service/time/time_manager.cpp index 1f7309f6b..51becd074 100644 --- a/src/core/hle/service/time/time_manager.cpp +++ b/src/core/hle/service/time/time_manager.cpp @@ -44,7 +44,11 @@ struct TimeManager::Impl final { const auto system_time{Clock::TimeSpanType::FromSeconds(GetExternalRtcValue())}; SetupStandardSteadyClock(system, Common::UUID::Generate(), system_time, {}, {}); SetupStandardLocalSystemClock(system, {}, system_time.ToSeconds()); - SetupStandardNetworkSystemClock({}, standard_network_clock_accuracy); + + Clock::SystemClockContext clock_context{}; + standard_local_system_clock_core.GetClockContext(system, clock_context); + + SetupStandardNetworkSystemClock(clock_context, standard_network_clock_accuracy); SetupStandardUserSystemClock(system, {}, Clock::SteadyClockTimePoint::GetRandom()); SetupEphemeralNetworkSystemClock(); } -- cgit v1.2.3