Postpone thread launching on g_fxo->init

This commit is contained in:
Eladash 2023-12-14 22:20:21 +02:00 committed by Elad Ashkenazi
parent a4bcba8971
commit 0c410f8a14
11 changed files with 112 additions and 44 deletions

View file

@ -2875,9 +2875,9 @@ void Emulator::Kill(bool allow_autoexit, bool savestate, savestate_stage* save_s
for (const auto& [type, data] : *g_fxo)
{
if (type.stop)
if (type.thread_op)
{
type.stop(data, thread_state::aborting);
type.thread_op(data, thread_state::aborting);
}
}
@ -2928,9 +2928,9 @@ void Emulator::Kill(bool allow_autoexit, bool savestate, savestate_stage* save_s
// Join threads
for (const auto& [type, data] : *g_fxo)
{
if (type.stop)
if (type.thread_op)
{
type.stop(data, thread_state::finished);
type.thread_op(data, thread_state::finished);
}
}