From 6125efabb11c04792aa43451f105a6cc008bb67e Mon Sep 17 00:00:00 2001 From: nakeee Date: Tue, 6 Jan 2009 21:35:39 +0000 Subject: [PATCH] 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 --- Source/Core/DolphinWX/Src/Main.cpp | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index d73a2d979b..89e23679a6 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -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 //////////////////////////////////