diff --git a/pcsx2/gui/FrameForGS.cpp b/pcsx2/gui/FrameForGS.cpp index 6ad7948acd..5bd4dba945 100644 --- a/pcsx2/gui/FrameForGS.cpp +++ b/pcsx2/gui/FrameForGS.cpp @@ -148,7 +148,7 @@ void GSPanel::OnResize(wxSizeEvent& event) void GSPanel::OnCloseWindow(wxCloseEvent& evt) { - wxGetApp().OnGsFrameClosed(); + CoreThread.Suspend(); evt.Skip(); // and close it. } @@ -254,7 +254,7 @@ GSFrame::GSFrame(wxWindow* parent, const wxString& title) // (main concern is retaining proper client window sizes when closing/re-opening the window). //m_statusbar = CreateStatusBar( 2 ); - //Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler (GSFrame::OnCloseWindow) ); + Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler (GSFrame::OnCloseWindow) ); Connect( wxEVT_MOVE, wxMoveEventHandler (GSFrame::OnMove) ); Connect( wxEVT_SIZE, wxSizeEventHandler (GSFrame::OnResize) ); Connect( wxEVT_ACTIVATE, wxActivateEventHandler (GSFrame::OnActivate) ); @@ -266,6 +266,13 @@ GSFrame::~GSFrame() throw() { } +void GSFrame::OnCloseWindow(wxCloseEvent& evt) +{ + sApp.OnGsFrameClosed(); + evt.Skip(); // and close it. +} + + wxStaticText* GSFrame::GetLabel_OutputDisabled() const { return (wxStaticText*)FindWindowById( m_id_OutputDisabled ); diff --git a/pcsx2/gui/MainFrame.h b/pcsx2/gui/MainFrame.h index c806b41a5f..15b37e5273 100644 --- a/pcsx2/gui/MainFrame.h +++ b/pcsx2/gui/MainFrame.h @@ -98,6 +98,7 @@ public: wxStaticText* GetLabel_OutputDisabled() const; protected: + void OnCloseWindow( wxCloseEvent& evt ); void OnMove( wxMoveEvent& evt ); void OnResize( wxSizeEvent& evt ); void OnActivate( wxActivateEvent& evt );