mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
reverted 1914, but updated the default handler instead
windows now suppose to use it until we fix the debug window git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1915 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
53d85bce9e
commit
38f8221bfc
@ -68,18 +68,16 @@ bool MsgAlert(const char* caption, bool yes_no, int Style, const char* format, .
|
|||||||
// ¯¯¯¯¯¯¯¯¯
|
// ¯¯¯¯¯¯¯¯¯
|
||||||
bool DefaultMsgHandler(const char* caption, const char* text, bool yes_no, int Style)
|
bool DefaultMsgHandler(const char* caption, const char* text, bool yes_no, int Style)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (yes_no)
|
int STYLE = MB_ICONINFORMATION;
|
||||||
// Return true for IDYES
|
if(Style == QUESTION) STYLE = MB_ICONQUESTION;
|
||||||
return IDYES == MessageBox(0, "Why is there no icon", caption,
|
if(Style == WARNING) STYLE = MB_ICONWARNING;
|
||||||
MB_ICONQUESTION | MB_YESNO);
|
|
||||||
else {
|
return IDYES == MessageBox(0, text, caption, STYLE | (yes_no ? MB_YESNO : MB_OK));
|
||||||
MessageBox(0, text, caption, MB_ICONWARNING);
|
|
||||||
return true;
|
#else
|
||||||
}
|
printf("%s\n", text);
|
||||||
#else
|
return true;
|
||||||
printf("%s\n", text);
|
#endif
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,9 +111,9 @@ bool DolphinApp::OnInit()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Register message box handler
|
// Register message box handler
|
||||||
#if defined(HAVE_WX) && HAVE_WX
|
#if ! defined(_WIN32) && defined(HAVE_WX) && HAVE_WX
|
||||||
RegisterMsgAlertHandler(&wxMsgAlert);
|
RegisterMsgAlertHandler(&wxMsgAlert);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------
|
// ------------------------------------------
|
||||||
@ -311,27 +311,14 @@ void DolphinApp::OnEndSession()
|
|||||||
}
|
}
|
||||||
/////////////////////////////////////// Main window created
|
/////////////////////////////////////// Main window created
|
||||||
|
|
||||||
|
#if defined HAVE_WX && HAVE_WX
|
||||||
/////////////////////////////////////////////////////////////
|
|
||||||
/* We declare this here instead of in Common/MsgHandler.cpp because we want to keep Common
|
|
||||||
free of wxWidget functions */
|
|
||||||
// ¯¯¯¯¯¯¯¯¯
|
|
||||||
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
|
return wxYES == wxMessageBox(wxString::FromAscii(text),
|
||||||
/* In Windows we use a MessageBox isntead of a wxMessageBox to don't block
|
wxString::FromAscii(caption),
|
||||||
the debug window */
|
(yes_no)?wxYES_NO:wxOK);
|
||||||
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),
|
|
||||||
wxString::FromAscii(caption),
|
|
||||||
(yes_no)?wxYES_NO:wxOK);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
//////////////////////////////////
|
//////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user