Fix segfault in linux if user clicks on the window manager close button of the

emulator.  Also added the ability to close the emulator with the escape key.
Fixed an issue that caused a segmentation fault when trying to close the
emulator when running in fullscreen mode, which can also be done using the
escape key.  This makes fullscreen mode useable in linux!


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5023 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice
2010-02-07 02:41:02 +00:00
parent 887d61ec17
commit 13437c1f6b
6 changed files with 45 additions and 16 deletions

View File

@ -520,7 +520,21 @@ CFrame* DolphinApp::GetCFrame()
void Host_Message(int Id)
{
#if defined(HAVE_X11) && HAVE_X11
switch(Id)
{
case WM_USER_STOP:
{
wxCommandEvent event(wxEVT_HOST_COMMAND, WM_USER_STOP);
main_frame->GetEventHandler()->AddPendingEvent(event);
break;
}
default:
main_frame->OnCustomHostMessage(Id);
}
#else
main_frame->OnCustomHostMessage(Id);
#endif
}
// OK, this thread boundary is DANGEROUS on linux