diff src/debug.cpp @ 7405:4aa2ed8e5f36 draft

(svn r10778) -Fix: one-liners to allow MSVC and WINCE to work together (or anyway, a step towards that goal) -Fix: put DEBUG lines under WINCE via a function designed for just that under WINCE
author truelight <truelight@openttd.org>
date Fri, 03 Aug 2007 23:26:12 +0000 (2007-08-03)
parents 0789677a15a0
children e300ac8001ae
line wrap: on
line diff
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -94,7 +94,14 @@
 		} else
 #endif /* ENABLE_NETWORK */
 		{
+#if defined(WINCE)
+			/* We need to do OTTD2FS twice, but as it uses a static buffer, we need to store one temporary */
+			TCHAR tbuf[512];
+			_sntprintf(tbuf, sizeof(tbuf), _T("%s"), OTTD2FS(dbg));
+			NKDbgPrintfW(_T("dbg: [%s] %s\n"), tbuf, OTTD2FS(buf));
+#else
 			fprintf(stderr, "dbg: [%s] %s\n", dbg, buf);
+#endif
 			IConsoleDebug(dbg, buf);
 		}
 	}