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

@@ -586,6 +586,8 @@ bool CrashLog::MakeCrashLog() const
printf("Crash dump written to %s. Please add this file to any bug reports.\n\n", filename);
}
SetScreenshotAuxiliaryText("Crash Log", buffer);
if (IsNonMainThread()) {
printf("Asking main thread to write crash savegame and screenshot...\n\n");
CrashLog::main_thread_pending_crashlog = this;
@@ -640,6 +642,7 @@ bool CrashLog::MakeDesyncCrashLog() const
}
if (!(_screen.width < 1 || _screen.height < 1 || _screen.dst_ptr == nullptr)) {
SetScreenshotAuxiliaryText("Desync Log", buffer);
bret = this->WriteScreenshot(filename, lastof(filename), name_buffer);
if (bret) {
printf("Desync screenshot written to %s. Please add this file to any bug reports.\n\n", filename);
@@ -647,6 +650,7 @@ bool CrashLog::MakeDesyncCrashLog() const
ret = false;
printf("Writing desync screenshot failed.\n\n");
}
ClearScreenshotAuxiliaryText();
}
return ret;