From 6842227ac2796edb6d82cbf0095c806fa6e738f6 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Mon, 6 Jun 2011 12:26:01 +0200 Subject: [PATCH] COMMON: Add kInfo LogMessageType. --- backends/platform/android/android.cpp | 4 ++++ common/system.cpp | 2 +- common/system.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp index 5ae0239bab5..bb201840094 100644 --- a/backends/platform/android/android.cpp +++ b/backends/platform/android/android.cpp @@ -575,6 +575,10 @@ void OSystem_Android::addSysArchivesToSearchSet(Common::SearchSet &s, void OSystem_Android::logMessage(LogMessageType::Type type, const char *message) { switch (type) { + case LogMessageType::kInfo: + __android_log_write(ANDROID_LOG_INFO, android_log_tag, message); + break; + case LogMessageType::kDebug: __android_log_write(ANDROID_LOG_DEBUG, android_log_tag, message); break; diff --git a/common/system.cpp b/common/system.cpp index 1f2f8cc6d52..34fc076492d 100644 --- a/common/system.cpp +++ b/common/system.cpp @@ -79,7 +79,7 @@ void OSystem::fatalError() { void OSystem::logMessage(LogMessageType::Type type, const char *message) { FILE *output = 0; - if (type == LogMessageType::kDebug) + if (type == LogMessageType::kInfo || type == LogMessageType::kDebug) output = stdout; else output = stderr; diff --git a/common/system.h b/common/system.h index b7fc870af77..243343ce0df 100644 --- a/common/system.h +++ b/common/system.h @@ -73,6 +73,7 @@ struct TimeDate { namespace LogMessageType { enum Type { + kInfo, kError, kWarning, kDebug