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
This commit is contained in:
Martin Gerhardy 2020-12-17 12:24:34 +01:00 committed by Thierry Crozat
parent 99dc24f7de
commit a7d4d0f232

View File

@ -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) {