Emu: always use Emu.Quit() to quit RPCS3

This creates a single possible point of failure for calling quit()
This commit is contained in:
Megamouse 2020-07-03 17:11:28 +02:00
parent 332f9cae77
commit d91551c277
5 changed files with 37 additions and 24 deletions

View file

@ -267,13 +267,21 @@ void gui_application::InitializeCallbacks()
{
EmuCallbacks callbacks = CreateCallbacks();
callbacks.exit = [this](bool force_quit)
callbacks.exit = [this](bool force_quit) -> bool
{
// Close rpcs3 if closed in no-gui mode
if (force_quit || !m_main_window)
{
if (m_main_window)
{
// Close main window in order to save its window state
m_main_window->close();
}
quit();
return true;
}
return false;
};
callbacks.call_after = [this](std::function<void()> func)
{