mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r17452) -Fix (r17450): emergency savegames weren't rejected by the crash logger anymore
This commit is contained in:
parent
4f7caea7fb
commit
46e5625278
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user