aboutsummaryrefslogtreecommitdiff
path: root/common/textconsole.cpp
diff options
context:
space:
mode:
authorAlejandro Marzini2010-06-08 03:31:27 +0000
committerAlejandro Marzini2010-06-08 03:31:27 +0000
commit7ea78b10364d34ae607a9a1da00e4d42ad691aa1 (patch)
treec16c3d224b2ad1179dbf3e7c54b5c0212b0581a4 /common/textconsole.cpp
parent7e9d54a69a3444f5335b8cf6ecabdeffe2830644 (diff)
parentea2e2053f25c216342c74bb7a74dabc682766720 (diff)
downloadscummvm-rg350-7ea78b10364d34ae607a9a1da00e4d42ad691aa1.tar.gz
scummvm-rg350-7ea78b10364d34ae607a9a1da00e4d42ad691aa1.tar.bz2
scummvm-rg350-7ea78b10364d34ae607a9a1da00e4d42ad691aa1.zip
Merged from trunk.
svn-id: r49499
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);