diff options
author | Cameron Cawley | 2018-05-27 22:24:55 +0100 |
---|---|---|
committer | Thierry Crozat | 2018-06-03 17:43:30 +0100 |
commit | ada05fd726f5e02a79f2de457241b614e33c7745 (patch) | |
tree | 61012ee3986407f8a31b4a31ae1db3728fac67d9 /backends/platform/wince/wince-sdl.cpp | |
parent | e1c83f8e8707abb268b3536c2993bcdd9dfee25e (diff) | |
download | scummvm-rg350-ada05fd726f5e02a79f2de457241b614e33c7745.tar.gz scummvm-rg350-ada05fd726f5e02a79f2de457241b614e33c7745.tar.bz2 scummvm-rg350-ada05fd726f5e02a79f2de457241b614e33c7745.zip |
WIN32: Move Windows-specific implementation of logMessage out of OSystem_SDL
Diffstat (limited to 'backends/platform/wince/wince-sdl.cpp')
-rw-r--r-- | backends/platform/wince/wince-sdl.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp index 02853b548e..f03068f6e3 100644 --- a/backends/platform/wince/wince-sdl.cpp +++ b/backends/platform/wince/wince-sdl.cpp @@ -623,6 +623,25 @@ void OSystem_WINCE3::getTimeAndDate(TimeDate &t) const { t.tm_wday = systime.wDayOfWeek; } +void OSystem_WINCE3::logMessage(LogMessageType::Type type, const char *message) { + OSystem_SDL::logMessage(type, message); + +#if defined( USE_WINDBG ) + TCHAR buf_unicode[1024]; + MultiByteToWideChar(CP_ACP, 0, message, strlen(message) + 1, buf_unicode, sizeof(buf_unicode)); + OutputDebugString(buf_unicode); + + if (type == LogMessageType::kError) { +#ifndef DEBUG + drawError(message); +#else + int cmon_break_into_the_debugger_if_you_please = *(int *)(message + 1); // bus error + printf("%d", cmon_break_into_the_debugger_if_you_please); // don't optimize the int out +#endif + } +#endif +} + Common::String OSystem_WINCE3::getSystemLanguage() const { #ifdef USE_DETECTLANG // We can not use "setlocale" (at least not for MSVC builds), since it |