I don't know why someone decided that a function called wxMsgAlert note the wx in the begining

should be opening win32 window on windows. But few points
- If something is blocked on some debug windows or so please either fix it or post an issue. Don't add ugly hacks.
- Read the function you are changing, there is a default handler, you could should have used it instead or create a new one.
- Please help dolphin look and feel as similar as possible to prevent later issues, so if you add a param please implement it on other
cases or at least add a TODO if you must



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1813 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2009-01-06 21:35:39 +00:00
parent ca3ebe743f
commit 6125efabb1
1 changed files with 8 additions and 16 deletions

View File

@ -313,25 +313,17 @@ void DolphinApp::OnEndSession()
/////////////////////////////////////////////////////////////
/* We declare this here instead of in Common/MsgHandler.cpp because we want to keep Common
free of wxWidget functions */
/* 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)
#if defined HAVE_WX && HAVE_WX
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),
wxString::FromAscii(caption),
(yes_no)?wxYES_NO:wxOK);
#endif
return wxYES == wxMessageBox(wxString::FromAscii(text),
wxString::FromAscii(caption),
(yes_no)?wxYES_NO:wxOK);
}
#endif
//////////////////////////////////