(svn r17410) -Codechange: use the same define for determining whether windows does crash reports instead of using several that aren't necessarily equal

This commit is contained in:
rubidium
2009-09-03 22:32:08 +00:00
parent b92143b53e
commit c9a1f33418
3 changed files with 25 additions and 34 deletions

View File

@@ -73,8 +73,8 @@ void ShowOSErrorBox(const char *buf, bool system)
MyShowCursor(true);
MessageBox(GetActiveWindow(), MB_TO_WIDE(buf), _T("Error!"), MB_ICONSTOP);
/* if exception tracker is enabled, we crash here to let the exception handler handle it. */
#if defined(WIN32_EXCEPTION_TRACKER) && !defined(_DEBUG)
/* If exception tracker is enabled, we crash here to let the exception handler handle it. */
#if defined(WIN32_EXCEPTION_TRACKER) && defined(NDEBUG)
if (system) {
SetExceptionString("%s", buf);
*(byte*)0 = 0;
@@ -383,20 +383,11 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
argc = ParseCommandLine(cmdline, argv, lengthof(argv));
#if defined(WIN32_EXCEPTION_TRACKER)
extern void Win32InitializeExceptions();
void Win32InitializeExceptions();
Win32InitializeExceptions();
#endif
#if defined(WIN32_EXCEPTION_TRACKER_DEBUG)
_try {
LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep);
#endif
ttd_main(argc, argv);
#if defined(WIN32_EXCEPTION_TRACKER_DEBUG)
} _except (ExceptionHandler(_exception_info())) {}
#endif
ttd_main(argc, argv);
return 0;
}