mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +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
|
@ -39,10 +39,15 @@ void headless_application::InitializeCallbacks()
|
|||
{
|
||||
EmuCallbacks callbacks = CreateCallbacks();
|
||||
|
||||
callbacks.exit = [this](bool force_quit) -> bool
|
||||
callbacks.try_to_quit = [this](bool force_quit, std::function<void()> on_exit) -> bool
|
||||
{
|
||||
if (force_quit)
|
||||
{
|
||||
if (on_exit)
|
||||
{
|
||||
on_exit();
|
||||
}
|
||||
|
||||
quit();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue