summaryrefslogtreecommitdiff
path: root/src/debug.cpp
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-08-03 23:26:12 +0000
committertruelight <truelight@openttd.org>2007-08-03 23:26:12 +0000
commit930bb8424231c4d11aa838f737ef5a7f2bc27db2 (patch)
tree47bcbff81f8436d0eb4b71288672b2917abb4e8d /src/debug.cpp
parentc02d8ebb09f6e4294f6fab6c8a5cc90ef483c36c (diff)
downloadopenttd-930bb8424231c4d11aa838f737ef5a7f2bc27db2.tar.xz
(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
Diffstat (limited to 'src/debug.cpp')
-rw-r--r--src/debug.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/debug.cpp b/src/debug.cpp
index 9f25f8faf..2e645e1e2 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -94,7 +94,14 @@ void CDECL debug(const char *dbg, ...)
} 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);
}
}