(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
This commit is contained in:
truelight
2007-08-03 23:26:12 +00:00
parent c02d8ebb09
commit 930bb84242
6 changed files with 29 additions and 9 deletions

View File

@@ -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);
}
}