diff options
| author | Jules Blok <jules.blok@gmail.com> | 2014-06-20 03:03:00 +0200 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2014-07-08 21:21:24 +0200 |
| commit | b30d5dccbe46c4bf9977a1437a826d082abebee0 (patch) | |
| tree | 8edaed412d98daddeb5cbe8fe32897dd415e0e23 /Source/Core/DolphinWX/Frame.cpp | |
| parent | 3266394dfbb564f69e3cd6470ad608a4db314916 (diff) | |
Frame: OnClose now handles asynchronous behaviour of DoStop().
Diffstat (limited to 'Source/Core/DolphinWX/Frame.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Frame.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 1807c5e53b..38b8ae7df0 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -352,7 +352,7 @@ CFrame::CFrame(wxFrame* parent, , m_LogWindow(nullptr), m_LogConfigWindow(nullptr) , m_FifoPlayerDlg(nullptr), UseDebugger(_UseDebugger) , m_bBatchMode(_BatchMode), m_bEdit(false), m_bTabSplit(false), m_bNoDocking(false) - , m_bGameLoading(false) + , m_bGameLoading(false), m_bClosing(false) { for (int i = 0; i <= IDM_CODEWINDOW - IDM_LOGWINDOW; i++) bFloatWindow[i] = false; @@ -536,15 +536,18 @@ void CFrame::OnActive(wxActivateEvent& event) void CFrame::OnClose(wxCloseEvent& event) { + m_bClosing = true; + + // Before closing the window we need to shut down the emulation core. + // We'll try to close this window again once that is done. if (Core::GetState() != Core::CORE_UNINITIALIZED) { DoStop(); - if (Core::GetState() != Core::CORE_UNINITIALIZED) - return; - UpdateGUI(); + event.Veto(); + return; } - //Stop Dolphin from saving the minimized Xpos and Ypos + // Stop Dolphin from saving the minimized Xpos and Ypos if (main_frame->IsIconized()) main_frame->Iconize(false); |
