mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 15:01:28 +12:00
Emu: implement on_exit callback
This commit is contained in:
parent
1adec3d8e5
commit
b655e4aa47
4 changed files with 18 additions and 8 deletions
|
@ -1979,13 +1979,13 @@ bool Emulator::Quit(bool force_quit)
|
|||
{
|
||||
m_force_boot = false;
|
||||
|
||||
// Deinitialize object manager to prevent any hanging objects at program exit
|
||||
if (force_quit)
|
||||
// The callback is only used if we actually quit RPCS3
|
||||
const auto on_exit = []()
|
||||
{
|
||||
// Deinitialize object manager to prevent any hanging objects at program exit
|
||||
*g_fxo = {};
|
||||
}
|
||||
|
||||
return GetCallbacks().exit(force_quit);
|
||||
};
|
||||
return GetCallbacks().try_to_quit(force_quit, on_exit);
|
||||
}
|
||||
|
||||
std::string Emulator::GetFormattedTitle(double fps) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue