diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-07-26 15:16:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-26 15:16:45 +0200 |
commit | fd659e869b86bc72d1e22ee601ba46d145b8dbaa (patch) | |
tree | e3aa657dc41993cf0935f17e603ff067bd6fb5b7 | |
parent | a155342eca0bf4417838e9d4f081450014f47e11 (diff) |
Windows: Make alert message box use MB_TASKMODAL
This flag pauses the current running thread, allowing for the user to see the
alert and acknowledge it before the thread continues (and e.g. crashes :)).
Thanks to @SuperUserNameMan for finding it.
Ref: https://msdn.microsoft.com/en-us/library/windows/desktop/ms645505(v=vs.85).aspx
-rw-r--r-- | platform/windows/os_windows.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index a3858fe641..571277f91e 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1343,7 +1343,7 @@ void OS_Windows::vprint(const char* p_format, va_list p_list, bool p_stderr) { void OS_Windows::alert(const String& p_alert,const String& p_title) { if (!is_no_window_mode_enabled()) - MessageBoxW(NULL,p_alert.c_str(),p_title.c_str(),MB_OK|MB_ICONEXCLAMATION); + MessageBoxW(NULL, p_alert.c_str(), p_title.c_str(), MB_OK | MB_ICONEXCLAMATION | MB_TASKMODAL); else print_line("ALERT: "+p_alert); } |