diff --git a/Core/System.cpp b/Core/System.cpp index b4d7c5bd00..5ce3efdb36 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -486,10 +486,15 @@ void PSP_Shutdown() { void PSP_BeginHostFrame() { // Reapply the graphics state of the PSP - gpu->ReapplyGfxState(); + if (gpu) { + gpu->BeginHostFrame(); + } } void PSP_EndHostFrame() { + if (gpu) { + gpu->EndHostFrame(); + } } void PSP_RunLoopUntil(u64 globalticks) { diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index 0cf5fc6bc1..1a42167ce2 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -40,6 +40,14 @@ GPUCommon::GPUCommon() : GPUCommon::~GPUCommon() { } +void GPUCommon::BeginHostFrame() { + ReapplyGfxState(); +} + +void GPUCommon::EndHostFrame() { + +} + void GPUCommon::Reinitialize() { easy_guard guard(listLock); memset(dls, 0, sizeof(dls)); diff --git a/GPU/GPUCommon.h b/GPU/GPUCommon.h index 3f023af4a8..690c1a402e 100644 --- a/GPU/GPUCommon.h +++ b/GPU/GPUCommon.h @@ -21,6 +21,9 @@ public: void Reinitialize() override; + void BeginHostFrame() override; + void EndHostFrame() override; + void InterruptStart(int listid) override; void InterruptEnd(int listid) override; void SyncEnd(GPUSyncType waitType, int listid, bool wokeThreads) override; diff --git a/GPU/GPUInterface.h b/GPU/GPUInterface.h index 570bb414eb..5cd115300c 100644 --- a/GPU/GPUInterface.h +++ b/GPU/GPUInterface.h @@ -214,6 +214,11 @@ public: virtual void InitClear() = 0; virtual void Reinitialize() = 0; + // Frame managment + virtual void BeginHostFrame() = 0; + virtual void EndHostFrame() = 0; + + // Events virtual void RunEventsUntil(u64 globalticks) = 0; virtual void FinishEventLoop() = 0;