Make gui panic alerts thread safe in linux.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6375 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Glenn Rice 2010-11-11 00:55:06 +00:00
parent 072a698856
commit 5078f430c3
4 changed files with 35 additions and 3 deletions

View file

@ -351,6 +351,8 @@ CFrame::CFrame(wxFrame* parent,
for (int i = 0; i <= IDM_CODEWINDOW - IDM_LOGWINDOW; i++)
bFloatWindow[i] = false;
panic_event.Init();
if (ShowLogWindow) SConfig::GetInstance().m_InterfaceLogWindow = true;
// Give it a console early to show potential messages from this onward
@ -490,6 +492,8 @@ CFrame::~CFrame()
ClosePages();
panic_event.Shutdown();
delete m_Mgr;
}
@ -647,6 +651,14 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
m_RenderParent->SetCursor(wxCURSOR_BLANK);
break;
#ifdef __WXGTK__
case IDM_PANIC:
bPanicResult = (wxYES == wxMessageBox(event.GetString(),
wxT("Warning"), event.GetInt() ? wxYES_NO : wxOK));
panic_event.Set();
break;
#endif
#if defined(HAVE_X11) && HAVE_X11
case WM_USER_STOP:
DoStop();