Main: Readded windows MessageBox
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1914 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
97818d6fe4
commit
53d85bce9e
|
@ -313,17 +313,25 @@ void DolphinApp::OnEndSession()
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////
|
||||||
/* We declare this here instead of in Common/MsgHandler.cpp because we want
|
/* We declare this here instead of in Common/MsgHandler.cpp because we want to keep Common
|
||||||
to keep Common free of wxWidget functions */
|
free of wxWidget functions */
|
||||||
// ¯¯¯¯¯¯¯¯¯
|
// ¯¯¯¯¯¯¯¯¯
|
||||||
#if defined HAVE_WX && HAVE_WX
|
|
||||||
bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int Style)
|
bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int Style)
|
||||||
{
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
|
/* In Windows we use a MessageBox isntead of a wxMessageBox to don't block
|
||||||
|
the debug window */
|
||||||
|
int STYLE = MB_ICONINFORMATION;
|
||||||
|
if(Style == QUESTION) STYLE = MB_ICONQUESTION;
|
||||||
|
if(Style == WARNING) STYLE = MB_ICONWARNING;
|
||||||
|
|
||||||
|
return IDYES == MessageBox(0, text, caption, STYLE | (yes_no ? MB_YESNO : MB_OK));
|
||||||
|
#else
|
||||||
return wxYES == wxMessageBox(wxString::FromAscii(text),
|
return wxYES == wxMessageBox(wxString::FromAscii(text),
|
||||||
wxString::FromAscii(caption),
|
wxString::FromAscii(caption),
|
||||||
(yes_no)?wxYES_NO:wxOK);
|
(yes_no)?wxYES_NO:wxOK);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
//////////////////////////////////
|
//////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue