From 648560b2d3e15e8f90e078f77f91cc90be91f2d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 4 Aug 2026 00:20:53 +0200 Subject: [PATCH] Don't exit games when leaving the emuthread --- Core/EmuThread.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Core/EmuThread.cpp b/Core/EmuThread.cpp index c77331ffe0..b4dae09cff 100644 --- a/Core/EmuThread.cpp +++ b/Core/EmuThread.cpp @@ -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();