From 53d85bce9e4c26088ec8a18df003275b00fc993c Mon Sep 17 00:00:00 2001 From: John Peterson Date: Sun, 18 Jan 2009 08:37:44 +0000 Subject: [PATCH] Main: Readded windows MessageBox git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1914 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/Main.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index 5c1f43b362..6549747e8f 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -313,17 +313,25 @@ 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 */ // ŻŻŻŻŻŻŻŻŻ -#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) { - return wxYES == wxMessageBox(wxString::FromAscii(text), - wxString::FromAscii(caption), - (yes_no)?wxYES_NO:wxOK); + #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 } -#endif //////////////////////////////////