diff options
author | Kostas Nakos | 2007-04-09 18:00:22 +0000 |
---|---|---|
committer | Kostas Nakos | 2007-04-09 18:00:22 +0000 |
commit | 258753e82cfa6fe5b427c6148b1ce0f812e87295 (patch) | |
tree | 7bfdfd810381bf962fc5338163d46e8ce547bcf1 | |
parent | 326068406649927a4d13ebfe7e280ed206cac872 (diff) | |
download | scummvm-rg350-258753e82cfa6fe5b427c6148b1ce0f812e87295.tar.gz scummvm-rg350-258753e82cfa6fe5b427c6148b1ce0f812e87295.tar.bz2 scummvm-rg350-258753e82cfa6fe5b427c6148b1ce0f812e87295.zip |
also copy debug output to the (redirected) log files
svn-id: r26439
-rw-r--r-- | common/util.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/common/util.cpp b/common/util.cpp index ffaf4a0dcc..6089681484 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -512,7 +512,7 @@ void NORETURN CDECL error(const char *s, ...) { // Print the error message to stderr #ifdef __GP32__ printf("ERROR: %s\n", buf_output); -#elif !defined(_WIN32_WCE) +#else fprintf(stderr, "%s!\n", buf_output); #endif @@ -539,13 +539,15 @@ void NORETURN CDECL error(const char *s, ...) { 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); +#ifndef DEBUG + drawError(buf_output); #else - OutputDebugString(buf_output); + int cmon_break_into_the_debugger_if_you_please = *(int *)(buf_output + 1); // bus error + printf("%d", cmon_break_into_the_debugger_if_you_please); // don't optimize the int out #endif +#else + OutputDebugString(buf_output); #endif - -#if defined ( _WIN32_WCE ) - drawError(buf_output); #endif #ifdef PALMOS_MODE @@ -573,7 +575,7 @@ void CDECL warning(const char *s, ...) { #ifdef __GP32__ //ph0x FIXME: implement fprint? printf("WARNING: %s\n", buf); #else -#if !defined (_WIN32_WCE) && !defined (__SYMBIAN32__) +#if !defined (__SYMBIAN32__) fprintf(stderr, "WARNING: %s!\n", buf); #endif #endif |