diff options
Diffstat (limited to 'common/textconsole.cpp')
-rw-r--r-- | common/textconsole.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/common/textconsole.cpp b/common/textconsole.cpp index eef58fa39c..87ba55ebf1 100644 --- a/common/textconsole.cpp +++ b/common/textconsole.cpp @@ -43,6 +43,10 @@ extern bool isSmartphone(); #define fputs(str, file) DS::std_fwrite(str, strlen(str), 1, file) #endif +#ifdef ANDROID + #include <android/log.h> +#endif + namespace Common { static OutputFormatter s_errorOutputFormatter = 0; @@ -71,7 +75,9 @@ void warning(const char *s, ...) { vsnprintf(buf, STRINGBUFLEN, s, va); va_end(va); -#if !defined (__SYMBIAN32__) +#if defined( ANDROID ) + __android_log_write(ANDROID_LOG_WARN, "ScummVM", buf); +#elif !defined (__SYMBIAN32__) fputs("WARNING: ", stderr); fputs(buf, stderr); fputs("!\n", stderr); @@ -141,6 +147,10 @@ void NORETURN_PRE error(const char *s, ...) { #endif #endif +#ifdef ANDROID + __android_log_assert("Fatal error", "ScummVM", "%s", buf_output); +#endif + #ifdef PALMOS_MODE extern void PalmFatalError(const char *err); PalmFatalError(buf_output); |