Don't exit games when leaving the emuthread

This commit is contained in:
Henrik Rydgård
2026-08-04 00:24:39 +02:00
parent 2e7e6ab5a7
commit 648560b2d3
+4 -3
View File
@@ -118,7 +118,9 @@ bool RunMainLoop(GraphicsContext *graphicsContext, Application *application, std
application->Frame(graphicsContext);
postFrame();
}
Core_Stop();
// NOTE: Don't call stuff like Core_Stop here. On Android, we fully shut down graphics when you switch away from the app,
// then boot it up again when returning. That means stopping this thread and restarting it.
// Process the shutdown. Without this, non-GL delays 800ms on shutdown.
Core_StateProcessed();
@@ -160,10 +162,9 @@ bool MainThreadFunc(GraphicsContext *graphicsContext, Application *application,
break;
}
}
Core_Stop();
g_inLoop = false;
EmuThread_Join(graphicsContext, emuThread);
g_inLoop = false;
graphicsContext->ThreadEnd();