diff --git a/Core/Core.cpp b/Core/Core.cpp index 252800ebac..fefd4e04d3 100644 --- a/Core/Core.cpp +++ b/Core/Core.cpp @@ -72,8 +72,8 @@ void Core_RunLoop() if (coreState == CORE_NEXTFRAME) { #ifdef _WIN32 - GL_SwapBuffers(); coreState = CORE_RUNNING; + GL_SwapBuffers(); #endif } } diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index 81d264e590..152b322fed 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -403,12 +403,15 @@ void hleEnterVblank(u64 userdata, int cyclesLate) { if (skipFrame) { gstate_c.skipDrawReason |= SKIPDRAW_SKIPFRAME; numSkippedFrames++; - } else { + } else { numSkippedFrames = 0; } if (!skipFlip) { - coreState = CORE_NEXTFRAME; + // Might've just quit / been paused. + if (coreState == CORE_RUNNING) { + coreState = CORE_NEXTFRAME; + } CoreTiming::ScheduleEvent(0 - cyclesLate, afterFlipEvent, 0); gpu->CopyDisplayToOutput(); diff --git a/headless/Headless.cpp b/headless/Headless.cpp index 0eb3f0d51d..37e616bf77 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -197,8 +197,8 @@ int main(int argc, const char* argv[]) // If we were rendering, this might be a nice time to do something about it. if (coreState == CORE_NEXTFRAME) { - headlessHost->SwapBuffers(); coreState = CORE_RUNNING; + headlessHost->SwapBuffers(); } }