aboutsummaryrefslogtreecommitdiff
path: root/common/textconsole.cpp
diff options
context:
space:
mode:
authorMax Horn2010-06-06 09:34:36 +0000
committerMax Horn2010-06-06 09:34:36 +0000
commit46155b2c3678784f6333eed1d65a35eefdcb2001 (patch)
tree1f570683935a5bede0e2475493a4f48b1548d320 /common/textconsole.cpp
parent3efec5720de2c46355c323763dee96b719ed5aa1 (diff)
downloadscummvm-rg350-46155b2c3678784f6333eed1d65a35eefdcb2001.tar.gz
scummvm-rg350-46155b2c3678784f6333eed1d65a35eefdcb2001.tar.bz2
scummvm-rg350-46155b2c3678784f6333eed1d65a35eefdcb2001.zip
Add Android backend from patch #2603856
svn-id: r49449
Diffstat (limited to 'common/textconsole.cpp')
-rw-r--r--common/textconsole.cpp12
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);