mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 22:11:26 +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
|
@ -283,11 +283,16 @@ void gui_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
|
||||
{
|
||||
// Close rpcs3 if closed in no-gui mode
|
||||
if (force_quit || !m_main_window)
|
||||
{
|
||||
if (on_exit)
|
||||
{
|
||||
on_exit();
|
||||
}
|
||||
|
||||
if (m_main_window)
|
||||
{
|
||||
// Close main window in order to save its window state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue