From 46155b2c3678784f6333eed1d65a35eefdcb2001 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 6 Jun 2010 09:34:36 +0000 Subject: Add Android backend from patch #2603856 svn-id: r49449 --- common/textconsole.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'common/textconsole.cpp') 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 +#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); -- cgit v1.2.3