Attempt to fix Emu.Quit()
There was some kind of "initialization order fiasco" of g_fxo. Not only should it be used after main, but also destroyed before exit.
This commit is contained in:
@@ -1971,6 +1971,9 @@ bool Emulator::Quit(bool force_quit)
|
|||||||
m_force_boot = false;
|
m_force_boot = false;
|
||||||
Emu.Stop();
|
Emu.Stop();
|
||||||
|
|
||||||
|
// Deinitialize object manager to prevent any hanging objects at program exit
|
||||||
|
*g_fxo = {};
|
||||||
|
|
||||||
return GetCallbacks().exit(force_quit);
|
return GetCallbacks().exit(force_quit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ namespace stx
|
|||||||
std::swap(m_list, x.m_list);
|
std::swap(m_list, x.m_list);
|
||||||
std::swap(m_order, x.m_order);
|
std::swap(m_order, x.m_order);
|
||||||
std::swap(m_init_count, x.m_init_count);
|
std::swap(m_init_count, x.m_init_count);
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
~manual_fixed_typemap()
|
~manual_fixed_typemap()
|
||||||
|
|||||||
Reference in New Issue
Block a user