diff --git a/desmume/src/frontend/cocoa/cocoa_GPU.mm b/desmume/src/frontend/cocoa/cocoa_GPU.mm index 25fb50338..3c5d5b1b9 100644 --- a/desmume/src/frontend/cocoa/cocoa_GPU.mm +++ b/desmume/src/frontend/cocoa/cocoa_GPU.mm @@ -914,11 +914,12 @@ public: } else { - if (_needRestoreRender3DLock) + if (_needRestoreRender3DLock && gpuEvent->GetRender3DNeedsFinish()) { gpuEvent->Render3DLock(); - _needRestoreRender3DLock = NO; } + + _needRestoreRender3DLock = NO; } } diff --git a/desmume/src/gfx3d.cpp b/desmume/src/gfx3d.cpp index a92361bb2..1eccf9657 100644 --- a/desmume/src/gfx3d.cpp +++ b/desmume/src/gfx3d.cpp @@ -567,6 +567,8 @@ void gfx3d_reset() if (CurrentRenderer->GetRenderNeedsFinish()) { GPU->ForceRender3DFinishAndFlush(false); + CurrentRenderer->SetRenderNeedsFinish(false); + GPU->GetEventHandler()->DidRender3DEnd(); } #ifdef _SHOW_VTX_COUNTERS