summaryrefslogtreecommitdiff
path: root/src/debug.cpp
diff options
context:
space:
mode:
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);
}
}