mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 22:11:26 +12:00
Emu: always use Emu.Quit() to quit RPCS3
This creates a single possible point of failure for calling quit()
This commit is contained in:
parent
332f9cae77
commit
d91551c277
5 changed files with 37 additions and 24 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue