(svn r15893) -Add: watermark crash.sav and don't generate crash information if a loaded crash.sav causes a crash

This commit is contained in:
glx
2009-03-30 00:21:43 +00:00
parent 6ceeb47c8b
commit ec704b21ca
6 changed files with 51 additions and 1 deletions

View File

@@ -234,8 +234,15 @@ 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 bool EmergencySave()
{
GamelogStartAction(GLAT_EMERGENCY);
GamelogEmergency();
GamelogStopAction();
SaveOrLoad("crash.sav", SL_SAVE, BASE_DIR);
return true;
}
@@ -471,6 +478,10 @@ static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
static bool had_exception = false;
if (had_exception) ExitProcess(0);
if (GamelogTestEmergency()) {
MessageBox(NULL, _emergency_crash, _T("Fatal Application Failure"), MB_ICONERROR);
ExitProcess(0);
}
had_exception = true;
_ident = GetTickCount(); // something pretty unique