Windows: Avoid lockup for RuntimeError exception

This is the same problem that the Plugin Open and BIOS load exceptions
had - The message box pops up, intercepts the hide event for GSFrame and
leaves you with no alternative but to terminate PCSX2 via the Task
Manager.

The same solution applies - Close the GSFrame first.
This commit is contained in:
Jonathan Li 2015-09-06 20:18:32 +01:00
parent d87b34ab36
commit ca0aeb8e62
1 changed files with 8 additions and 1 deletions

View File

@ -739,8 +739,15 @@ void Pcsx2App::HandleEvent(wxEvtHandler* handler, wxEventFunction func, wxEvent&
// Runtime errors which have been unhandled should still be safe to recover from, // Runtime errors which have been unhandled should still be safe to recover from,
// so lets issue a message to the user and then continue the message pump. // so lets issue a message to the user and then continue the message pump.
// Test case (Windows only, Linux has an uncaught exception for some
// reason): Run PSX ISO using fast boot
if (GSFrame* gsframe = wxGetApp().GetGsFramePtr())
gsframe->Close();
Console.Error( ex.FormatDiagnosticMessage() ); Console.Error( ex.FormatDiagnosticMessage() );
Msgbox::Alert( ex.FormatDisplayMessage() ); // I should probably figure out how to have the error message as well.
if (wxGetApp().HasGUI())
Msgbox::Alert( ex.FormatDisplayMessage() );
} }
} }