summaryrefslogtreecommitdiff
path: root/src/os/windows
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-09-07 12:13:33 +0000
committerrubidium <rubidium@openttd.org>2009-09-07 12:13:33 +0000
commit46e562527887679c422c7bdc32efe4634c20670e (patch)
tree66bc2610eabddad0d768681f204232bc8d992205 /src/os/windows
parent4f7caea7fb13500a31a3d028862dc3ef48c52340 (diff)
downloadopenttd-46e562527887679c422c7bdc32efe4634c20670e.tar.xz
(svn r17452) -Fix (r17450): emergency savegames weren't rejected by the crash logger anymore
Diffstat (limited to 'src/os/windows')
-rw-r--r--src/os/windows/crashlog_win.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/os/windows/crashlog_win.cpp b/src/os/windows/crashlog_win.cpp
index 4919fa683..68eaf3419 100644
--- a/src/os/windows/crashlog_win.cpp
+++ b/src/os/windows/crashlog_win.cpp
@@ -17,6 +17,7 @@
#include "../../string_func.h"
#include "../../fileio_func.h"
#include "../../strings_func.h"
+#include "../../gamelog.h"
#include <windows.h>
@@ -366,6 +367,14 @@ static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
ExitProcess(2);
}
+ if (GamelogTestEmergency()) {
+ static const TCHAR _emergency_crash[] =
+ _T("A serious fault condition occured in the game. The game will shut down.\n")
+ _T("As you loaded an emergency savegame no crash information will be generated.\n");
+ MessageBox(NULL, _emergency_crash, _T("Fatal Application Failure"), MB_ICONERROR);
+ ExitProcess(3);
+ }
+
CrashLogWindows *log = new CrashLogWindows(ep);
CrashLogWindows::current = log;
log->FillCrashLog(log->crashlog, lastof(log->crashlog));
@@ -427,10 +436,6 @@ static const TCHAR _save_succeeded[] =
_T("Be aware that critical parts of the internal game state may have become ")
_T("corrupted. The saved game is not guaranteed to work.");
-static const TCHAR _emergency_crash[] =
- _T("A serious fault condition occured in the game. The game will shut down.\n")
- _T("As you loaded an emergency savegame no crash information will be generated.\n");
-
static const TCHAR * const _expand_texts[] = {_T("S&how report >>"), _T("&Hide report <<") };
static void SetWndSize(HWND wnd, int mode)