diff options
| author | Charles Giessen <charles@lunarg.com> | 2021-11-14 11:32:31 -0700 |
|---|---|---|
| committer | Charles Giessen <46324611+charles-lunarg@users.noreply.github.com> | 2022-02-02 16:22:12 -0700 |
| commit | 7273e43d41c4d4b8296ca940b287362bfe3104ff (patch) | |
| tree | 409263dcb690db7c53ca584f8958a28d29e95519 | |
| parent | 7d7fd1b403d9fcbda5a573088ef0b12b61de97e8 (diff) | |
| download | usermoji-7273e43d41c4d4b8296ca940b287362bfe3104ff.tar.xz | |
vulkaninfo: Prevent WinCRT debug popups
Add the necessary winCRT calls to prevent debug popups from occuring when
vulkaninfo crashes. This is necessary to prevent hangs in CI, where these
popups can and do occur.
| -rw-r--r-- | vulkaninfo/vulkaninfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp index 1032877f..53838eeb 100644 --- a/vulkaninfo/vulkaninfo.cpp +++ b/vulkaninfo/vulkaninfo.cpp @@ -1030,6 +1030,11 @@ int main(int argc, char **argv) { ParsedResults parse_data = parsing_return.value(); #ifdef _WIN32 + _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); + SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX); + _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); + if (ConsoleIsExclusive()) ConsoleEnlarge(); User32Handles local_user32_handles; user32_handles = &local_user32_handles; |
