race condition causing emu thread exceptions to be ignored

in multithreaded mode, checkStatus() *must* be called to report
exceptions thrown by the emu thread
This commit is contained in:
Flyinghead 2022-12-05 21:24:27 +01:00
parent 19204882c4
commit e48b72a859
1 changed files with 4 additions and 2 deletions

View File

@ -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?
}