(svn r17452) -Fix (r17450): emergency savegames weren't rejected by the crash logger anymore

This commit is contained in:
rubidium 2009-09-07 12:13:33 +00:00
parent 4f7caea7fb
commit 46e5625278

View File

@ -17,6 +17,7 @@
#include "../../string_func.h" #include "../../string_func.h"
#include "../../fileio_func.h" #include "../../fileio_func.h"
#include "../../strings_func.h" #include "../../strings_func.h"
#include "../../gamelog.h"
#include <windows.h> #include <windows.h>
@ -366,6 +367,14 @@ static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
ExitProcess(2); 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 *log = new CrashLogWindows(ep);
CrashLogWindows::current = log; CrashLogWindows::current = log;
log->FillCrashLog(log->crashlog, lastof(log->crashlog)); 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("Be aware that critical parts of the internal game state may have become ")
_T("corrupted. The saved game is not guaranteed to work."); _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 const TCHAR * const _expand_texts[] = {_T("S&how report >>"), _T("&Hide report <<") };
static void SetWndSize(HWND wnd, int mode) static void SetWndSize(HWND wnd, int mode)