Fix attempt for Issue 533 - appcrash on closing GS window.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2532 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2010-01-28 11:01:21 +00:00
parent d43282c1ac
commit 934ec2c0ba
2 changed files with 10 additions and 2 deletions

View File

@ -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 );

View File

@ -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 );