[Scummvm-git-logs] scummvm master -> a7d4d0f232231eb3d22c85d35ddfbcc2be0e587c

criezy criezy at scummvm.org
Wed Feb 17 12:51:49 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
a7d4d0f232 GUI: added debug output for console prints


Commit: a7d4d0f232231eb3d22c85d35ddfbcc2be0e587c
    https://github.com/scummvm/scummvm/commit/a7d4d0f232231eb3d22c85d35ddfbcc2be0e587c
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-02-17T12:51:46Z

Commit Message:
GUI: added debug output for console prints

this is useful for situations where the game crashes or is quit, but you still need to
output of the debug commands for investigating the issue

Changed paths:
    gui/console.cpp


diff --git a/gui/console.cpp b/gui/console.cpp
index 84fc9616ec..bfc9488b69 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -675,10 +675,13 @@ int ConsoleDialog::printFormat(int dummy, const char *format, ...) {
 
 int ConsoleDialog::vprintFormat(int dummy, const char *format, va_list argptr) {
 	Common::String buf = Common::String::vformat(format, argptr);
+	const int size = buf.size();
 
 	print(buf.c_str());
+	buf.trim();
+	debug("%s", buf.c_str());
 
-	return buf.size();
+	return size;
 }
 
 void ConsoleDialog::printChar(int c) {




More information about the Scummvm-git-logs mailing list