Permalink
Browse files

Cocoa Port: Fix a potential deadlock that may occur on emulation reset.

  • Loading branch information...
rogerman committed Feb 4, 2018
1 parent 9ee7cd8 commit d1dcbb821833006973146143283e9458bdd94b72
Showing with 5 additions and 2 deletions.
  1. +3 −2 desmume/src/frontend/cocoa/cocoa_GPU.mm
  2. +2 −0 desmume/src/gfx3d.cpp
@@ -914,11 +914,12 @@ - (void) respondToPauseState:(BOOL)isPaused
}
else
{
if (_needRestoreRender3DLock)
if (_needRestoreRender3DLock && gpuEvent->GetRender3DNeedsFinish())
{
gpuEvent->Render3DLock();
_needRestoreRender3DLock = NO;
}
_needRestoreRender3DLock = NO;
}
}
@@ -567,6 +567,8 @@ void gfx3d_reset()
if (CurrentRenderer->GetRenderNeedsFinish())
{
GPU->ForceRender3DFinishAndFlush(false);
CurrentRenderer->SetRenderNeedsFinish(false);
GPU->GetEventHandler()->DidRender3DEnd();
}
#ifdef _SHOW_VTX_COUNTERS

0 comments on commit d1dcbb8

Please sign in to comment.