From e48b72a859c10e3120234397202af461d5dfc7da Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Mon, 5 Dec 2022 21:24:27 +0100 Subject: [PATCH] race condition causing emu thread exceptions to be ignored in multithreaded mode, checkStatus() *must* be called to report exceptions thrown by the emu thread --- core/emulator.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/emulator.cpp b/core/emulator.cpp index 22cd26a53..0bf549bf6 100644 --- a/core/emulator.cpp +++ b/core/emulator.cpp @@ -842,16 +842,18 @@ bool Emulator::checkStatus() bool Emulator::render() { - if (state != Running) - return false; if (!config::ThreadedRendering) { + if (state != Running) + return false; run(); // TODO if stopping due to a user request, no frame has been rendered return !renderTimeout; } if (!checkStatus()) return false; + if (state != Running) + return false; return rend_single_frame(true); // FIXME stop flag? }