mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
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
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user