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

This commit is contained in:
rogerman 2018-02-04 13:07:59 -08:00
parent 9ee7cd8ec0
commit d1dcbb8218
2 changed files with 5 additions and 2 deletions

View File

@ -914,11 +914,12 @@ public:
}
else
{
if (_needRestoreRender3DLock)
if (_needRestoreRender3DLock && gpuEvent->GetRender3DNeedsFinish())
{
gpuEvent->Render3DLock();
_needRestoreRender3DLock = NO;
}
_needRestoreRender3DLock = NO;
}
}

View File

@ -567,6 +567,8 @@ void gfx3d_reset()
if (CurrentRenderer->GetRenderNeedsFinish())
{
GPU->ForceRender3DFinishAndFlush(false);
CurrentRenderer->SetRenderNeedsFinish(false);
GPU->GetEventHandler()->DidRender3DEnd();
}
#ifdef _SHOW_VTX_COUNTERS