diff options
-rw-r--r-- | common/engine.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/common/engine.cpp b/common/engine.cpp index f89793b14a..b00a3594b3 100644 --- a/common/engine.cpp +++ b/common/engine.cpp @@ -131,8 +131,14 @@ void NORETURN CDECL error(const char *s, ...) { #endif #if defined( USE_WINDBG ) +#if defined( _WIN32_WCE ) + TCHAR buf_output_unicode[1024]; + MultiByteToWideChar(CP_ACP, 0, buf_output, strlen(buf_output) + 1, buf_output_unicode, sizeof(buf_output_unicode)); + OutputDebugString(buf_output_unicode); +#else OutputDebugString(buf_output); #endif +#endif #if defined ( _WIN32_WCE ) drawError(buf_output); @@ -168,8 +174,14 @@ void CDECL warning(const char *s, ...) { #endif #if defined( USE_WINDBG ) strcat(buf, "\n"); +#if defined( _WIN32_WCE ) + TCHAR buf_unicode[1024]; + MultiByteToWideChar(CP_ACP, 0, buf, strlen(buf) + 1, buf_unicode, sizeof(buf_unicode)); + OutputDebugString(buf_unicode); +#else OutputDebugString(buf); #endif +#endif } uint16 _debugLevel = 1; @@ -192,8 +204,14 @@ void CDECL debug(int level, const char *s, ...) { #if defined( USE_WINDBG ) strcat(buf, "\n"); +#if defined( _WIN32_WCE ) + TCHAR buf_unicode[1024]; + MultiByteToWideChar(CP_ACP, 0, buf, strlen(buf) + 1, buf_unicode, sizeof(buf_unicode)); + OutputDebugString(buf_unicode); +#else OutputDebugString(buf); #endif +#endif fflush(stdout); } |