Include crash/desync log contents in PNG screenshots

This commit is contained in:
Jonathan G Rennison
2019-05-21 00:52:37 +01:00
parent e64706d147
commit 951a50ddd9
5 changed files with 28 additions and 3 deletions

View File

@@ -22,6 +22,7 @@
#include "../../saveload/saveload.h"
#include "../../video/video_driver.hpp"
#include "../../openttd.h"
#include "../../screenshot.h"
#if defined(WITH_DEMANGLE)
#include <cxxabi.h>
#endif
@@ -554,6 +555,7 @@ static LONG WINAPI ExceptionHandler(EXCEPTION_POINTERS *ep)
log->WriteCrashDump(log->crashdump_filename, lastof(log->crashdump_filename));
log->AppendDecodedStacktrace(buf, lastof(log->crashlog));
log->WriteCrashLog(log->crashlog, log->crashlog_filename, lastof(log->crashlog_filename));
SetScreenshotAuxiliaryText("Crash Log", log->crashlog);
log->WriteScreenshot(log->screenshot_filename, lastof(log->screenshot_filename));
/* Close any possible log files */