From bdba92c84217adf9689a5ff4c42373ebf8927492 Mon Sep 17 00:00:00 2001 From: Nick Fisher Date: Thu, 15 May 2025 16:54:30 +0800 Subject: [PATCH] set emscripten main thread to nullptr when RenderThread is stopped --- thermion_dart/native/src/rendering/RenderThread.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/thermion_dart/native/src/rendering/RenderThread.cpp b/thermion_dart/native/src/rendering/RenderThread.cpp index 23ba0d63..66715eb4 100644 --- a/thermion_dart/native/src/rendering/RenderThread.cpp +++ b/thermion_dart/native/src/rendering/RenderThread.cpp @@ -43,6 +43,7 @@ static void mainLoop(void* arg) { // Log("Spent %lldms processing, %d iters", elapsed, numIters); if(rt->_stop) { Log("RenderThread stopped") + emscripten_set_main_loop_arg(nullptr, nullptr, 0, true); } }