diff options
author | rubidium <rubidium@openttd.org> | 2009-09-07 11:10:49 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-09-07 11:10:49 +0000 |
commit | 2b144e2ea65e9ffc61b493a94063585c21b17a0e (patch) | |
tree | 4bf125c97b6dd57750015c5952888ebd12d9e2e1 /src/os/windows/win32.cpp | |
parent | 8186dd616b628d822abad295183c29de3d4b95ab (diff) | |
download | openttd-2b144e2ea65e9ffc61b493a94063585c21b17a0e.tar.xz |
(svn r17450) -Codechange: refactor the windows crash logger so parts of it can be reused by other crash logger implementations
Diffstat (limited to 'src/os/windows/win32.cpp')
-rw-r--r-- | src/os/windows/win32.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
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 <errno.h> #include <sys/stat.h> @@ -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; } |