From 2b144e2ea65e9ffc61b493a94063585c21b17a0e Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 7 Sep 2009 11:10:49 +0000 Subject: (svn r17450) -Codechange: refactor the windows crash logger so parts of it can be reused by other crash logger implementations --- src/os/windows/win32.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/os/windows/win32.cpp') diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp index 985a7a343..6ca970149 100644 --- a/src/os/windows/win32.cpp +++ b/src/os/windows/win32.cpp @@ -23,6 +23,7 @@ #include "../../functions.h" #include "../../core/random_func.hpp" #include "../../string_func.h" +#include "../../crashlog.h" #include #include @@ -72,14 +73,6 @@ 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(NDEBUG) - if (system) { - SetExceptionString("%s", buf); - *(byte*)0 = 0; - } -#endif } /* Code below for windows version of opendir/readdir/closedir copied and @@ -354,6 +347,8 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi _codepage = GetACP(); // get system codepage as some kind of a default #endif /* UNICODE */ + CrashLog::InitialiseCrashLog(); + #if defined(UNICODE) #if !defined(WINCE) @@ -382,11 +377,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi argc = ParseCommandLine(cmdline, argv, lengthof(argv)); -#if defined(WIN32_EXCEPTION_TRACKER) - void Win32InitializeExceptions(); - Win32InitializeExceptions(); -#endif - ttd_main(argc, argv); return 0; } -- cgit v1.2.3-70-g09d2