From ec411e0ecbcec81f5d6bdddaeb4192bdaf3fa11e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 22 Jan 2024 19:35:26 +0100 Subject: [PATCH] Change when we call rc_client_do_frame to something that matches libretro There's conflicting advice on when to do it, but to avoid people testing their cheats twice, let's match as closely as we can. This means that 30hz games will only have the callback run at 30hz. The duplicate frames option may interfere, just like it may on libretro. --- Core/HLE/sceDisplay.cpp | 3 --- UI/EmuScreen.cpp | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index d636a9b12abc..31879032b3ea 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -499,9 +499,6 @@ static void DoFrameIdleTiming() { void hleEnterVblank(u64 userdata, int cyclesLate) { int vbCount = userdata; - // This should be a good place to do it. Should happen once per vblank. Here or in leave? Not sure it matters much. - Achievements::FrameUpdate(); - VERBOSE_LOG(SCEDISPLAY, "Enter VBlank %i", vbCount); DisplayFireVblankStart(); diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index e634f413501d..a1726643cfa1 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -1432,6 +1432,9 @@ ScreenRenderFlags EmuScreen::render(ScreenRenderMode mode) { } PSP_EndHostFrame(); + + // This place rougly matches how libretro handles it (after retro_frame). + Achievements::FrameUpdate(); }