From cc8dbdd3fb58a02e1c3fc3b9d0b1c35bc7b9d00f Mon Sep 17 00:00:00 2001 From: Thog Date: Wed, 20 May 2020 11:35:30 +0200 Subject: [PATCH] time: Make sure to initialize the network system clock with a valid system clock (#1259) This should fix AC:NH events and probably other games. --- Ryujinx.HLE/HOS/Horizon.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Ryujinx.HLE/HOS/Horizon.cs b/Ryujinx.HLE/HOS/Horizon.cs index 27200377..34e16e79 100644 --- a/Ryujinx.HLE/HOS/Horizon.cs +++ b/Ryujinx.HLE/HOS/Horizon.cs @@ -161,7 +161,9 @@ namespace Ryujinx.HLE.HOS { TimeSpanType standardNetworkClockSufficientAccuracy = new TimeSpanType((int)standardNetworkClockSufficientAccuracyMinutes * 60000000000); - TimeServiceManager.Instance.SetupStandardNetworkSystemClock(new SystemClockContext(), standardNetworkClockSufficientAccuracy); + // The network system clock needs a valid system clock, as such we setup this system clock using the local system clock. + TimeServiceManager.Instance.StandardLocalSystemClock.GetClockContext(null, out SystemClockContext localSytemClockContext); + TimeServiceManager.Instance.SetupStandardNetworkSystemClock(localSytemClockContext, standardNetworkClockSufficientAccuracy); } TimeServiceManager.Instance.SetupStandardUserSystemClock(null, false, SteadyClockTimePoint.GetRandom());