More work on shutdown, still hanging though.

This commit is contained in:
Henrik Rydgård committed 2018-01-27 15:10:17 +01:00
1 parent 57615344e4
commit fdca06d208
7 files changed
+73 -54

No files matched your search

+9 -1
View File
@@ -104,7 +104,13 @@ void RenderThreadFunc() {
renderThreadSucceeded = true;
}
g_graphicsContext->ThreadFrame();
g_graphicsContext->ThreadStart();
while (emuThreadState != THREAD_SHUTDOWN) {
if (!g_graphicsContext->ThreadFrame())
break;
}
g_graphicsContext->ThreadEnd();
g_graphicsContext->ShutdownFromRenderThread();
}
void EmuThreadFunc() {
@@ -227,6 +233,8 @@ shutdown:
emuThreadState = THREAD_SHUTDOWN;
NativeShutdownGraphics();
if (!useRenderThread)
g_graphicsContext->ShutdownFromRenderThread();
// NativeShutdown deletes the graphics context through host->ShutdownGraphics().
NativeShutdown();