[Scummvm-cvs-logs] SF.net SVN: scummvm: [24712] scummvm/trunk/common/util.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Nov 13 21:56:12 CET 2006


Revision: 24712
          http://svn.sourceforge.net/scummvm/?rev=24712&view=rev
Author:   fingolfin
Date:     2006-11-13 12:56:11 -0800 (Mon, 13 Nov 2006)

Log Message:
-----------
Prepend the Engine::errorString to debug messages, too (it should probably be renamed to reflect this...)

Modified Paths:
--------------
    scummvm/trunk/common/util.cpp

Modified: scummvm/trunk/common/util.cpp
===================================================================
--- scummvm/trunk/common/util.cpp	2006-11-13 20:20:01 UTC (rev 24711)
+++ scummvm/trunk/common/util.cpp	2006-11-13 20:56:11 UTC (rev 24712)
@@ -361,7 +361,16 @@
 
 
 
-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 @@
 	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 {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list