From 11be1e7a677010c632856568d2cc987ca30ee19a Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 18 Feb 2019 19:24:11 -0800 Subject: [PATCH] Core: Fix lag sync on game start / after pause. Fixes #11189. It was often stuck thinking it was constantly running over, needed a reset on large delay. --- Core/HLE/sceDisplay.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index 4b25735e31ea..57f510f278d9 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -180,6 +180,11 @@ void __DisplayFlip(int cyclesLate); static void ScheduleLagSync(int over = 0) { lagSyncScheduled = g_Config.bForceLagSync; if (lagSyncScheduled) { + // Reset over if it became too high, such as after pausing or initial loading. + // There's no real sense in it being more than 1/60th of a second. + if (over > 1000000 / 60) { + over = 0; + } CoreTiming::ScheduleEvent(usToCycles(1000 + over), lagSyncEvent, 0); lastLagSync = real_time_now(); }