aboutsummaryrefslogtreecommitdiff
path: root/common/util.cpp
diff options
context:
space:
mode:
authorMax Horn2006-11-13 20:56:11 +0000
committerMax Horn2006-11-13 20:56:11 +0000
commit86d988132c8e422d34fd5732e18277253865791b (patch)
tree2b0bf80846e82721804c9bf620a264e2d796e60e /common/util.cpp
parentdf2ccb78c2bb48c2b12027063770f3e0dce8eb6d (diff)
downloadscummvm-rg350-86d988132c8e422d34fd5732e18277253865791b.tar.gz
scummvm-rg350-86d988132c8e422d34fd5732e18277253865791b.tar.bz2
scummvm-rg350-86d988132c8e422d34fd5732e18277253865791b.zip
Prepend the Engine::errorString to debug messages, too (it should probably be renamed to reflect this...)
svn-id: r24712
Diffstat (limited to 'common/util.cpp')
-rw-r--r--common/util.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/common/util.cpp b/common/util.cpp
index aee003363b..e238abe05f 100644
--- a/common/util.cpp
+++ b/common/util.cpp
@@ -361,7 +361,16 @@ int gDebugLevel = -1;
-static void debugHelper(char *buf, bool caret = true) {
+static void debugHelper(const char *in_buf, bool caret = true) {
+ char buf[STRINGBUFLEN];
+
+ // Next, give the active engine (if any) a chance to augment the message
+ if (g_engine) {
+ g_engine->errorString(in_buf, buf);
+ } else {
+ strcpy(buf, in_buf);
+ }
+
#ifndef _WIN32_WCE
if (caret)
printf("%s\n", buf);
@@ -448,8 +457,7 @@ void NORETURN CDECL error(const char *s, ...) {
va_end(va);
- // Next, give the active engine (if any) a chance to augment the
- // error message
+ // Next, give the active engine (if any) a chance to augment the message
if (g_engine) {
g_engine->errorString(buf_input, buf_output);
} else {