From a5a45992ad1b842e6b605850574a2be6655cdd1c Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Fri, 15 Jul 2011 14:49:34 +0000 Subject: Add a new type of message box (CRITICAL style) which can not be disabled. Then use that message box to display shader compilation errors in the OpenGL backend to maintain consistency with the behaviour of the DirectX backends. Also fix the wxMessageAlert called from non-gui threads in the WXGTK build to use the passed caption. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7678 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Common/Src/MsgHandler.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Source/Core/Common/Src/MsgHandler.cpp') diff --git a/Source/Core/Common/Src/MsgHandler.cpp b/Source/Core/Common/Src/MsgHandler.cpp index 9f980fedd2..3f68e1d29a 100644 --- a/Source/Core/Common/Src/MsgHandler.cpp +++ b/Source/Core/Common/Src/MsgHandler.cpp @@ -58,12 +58,14 @@ bool MsgAlert(bool yes_no, int Style, const char* format, ...) static std::string info_caption; static std::string warn_caption; static std::string ques_caption; + static std::string crit_caption; if (!info_caption.length()) { info_caption = str_translator(_trans("Information")); ques_caption = str_translator(_trans("Question")); warn_caption = str_translator(_trans("Warning")); + crit_caption = str_translator(_trans("Critical")); } switch(Style) @@ -77,6 +79,9 @@ bool MsgAlert(bool yes_no, int Style, const char* format, ...) case WARNING: caption = warn_caption; break; + case CRITICAL: + caption = crit_caption; + break; } va_list args; @@ -87,7 +92,7 @@ bool MsgAlert(bool yes_no, int Style, const char* format, ...) ERROR_LOG(MASTER_LOG, "%s: %s", caption.c_str(), buffer); // Don't ignore questions, especially AskYesNo, PanicYesNo could be ignored - if (msg_handler && (AlertEnabled || Style == QUESTION)) + if (msg_handler && (AlertEnabled || Style == QUESTION || Style == CRITICAL)) return msg_handler(caption.c_str(), buffer, yes_no, Style); return true; -- cgit v1.2.3