CoreCore/CrashHandler: Handle CRT asserts in Windows build

Handle CRT asserts in Windows crash handler instead of popping up a Abort/Retry/Ignore window
This commit is contained in:
jackpoz
2014-01-19 17:59:01 +01:00
parent 3102da5263
commit 138a336384
@@ -62,6 +62,13 @@ WheatyExceptionReport::WheatyExceptionReport() // Constructor
// Install the unhandled exception filter function
m_previousFilter = SetUnhandledExceptionFilter(WheatyUnhandledExceptionFilter);
m_hProcess = GetCurrentProcess();
if (!IsDebuggerPresent())
{
_CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE);
_CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR);
_CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE);
_CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);
}
}
//============