windows: fix application crashed popup in debug version
This is a backport of 2 patches by Ting-Yu Lin and Hiroaki Nakamura.
This commit is contained in:
parent
39ca621987
commit
4900912d44
@ -25,6 +25,10 @@
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
#include <windows.h>
|
||||
#if !defined(__MINGW32__)
|
||||
#include <crtdbg.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "task.h"
|
||||
#include "runner.h"
|
||||
@ -44,6 +48,10 @@ void platform_init(int argc, char **argv) {
|
||||
/* Disable the "application crashed" popup. */
|
||||
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX |
|
||||
SEM_NOOPENFILEERRORBOX);
|
||||
#if !defined(__MINGW32__)
|
||||
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
|
||||
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG);
|
||||
#endif
|
||||
|
||||
_setmode(0, _O_BINARY);
|
||||
_setmode(1, _O_BINARY);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user