From 69e271225f43e7c6c34fbc9c1e0cf73afeedfe18 Mon Sep 17 00:00:00 2001 From: dhewg Date: Sat, 19 Mar 2011 12:17:43 +0100 Subject: ANDROID: Log some system properties --- backends/platform/android/android.cpp | 14 ++++++++++++++ backends/platform/android/android.h | 2 ++ 2 files changed, 16 insertions(+) (limited to 'backends/platform') diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp index 6bb6de7289..73b310c0bc 100644 --- a/backends/platform/android/android.cpp +++ b/backends/platform/android/android.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include @@ -131,6 +132,11 @@ OSystem_Android::OSystem_Android(int audio_sample_rate, int audio_buffer_size) : _touchpad_scale(66), _dpad_scale(4), _trackball_scale(2) { + LOGI("Running on: [%s] [%s] SDK:%s ABI:%s", + getSystemProperty("ro.build.fingerprint").c_str(), + getSystemProperty("ro.build.display.id").c_str(), + getSystemProperty("ro.build.version.sdk").c_str(), + getSystemProperty("ro.product.cpu.abi").c_str()); } OSystem_Android::~OSystem_Android() { @@ -548,6 +554,14 @@ void OSystem_Android::logMessage(LogMessageType::Type type, } } +Common::String OSystem_Android::getSystemProperty(const char *name) const { + char value[PROP_VALUE_MAX]; + + int len = __system_property_get(name, value); + + return Common::String(value, len); +} + #ifdef DYNAMIC_MODULES void AndroidPluginProvider::addCustomDirectories(Common::FSList &dirs) const { ((OSystem_Android *)g_system)->addPluginDirectories(dirs); diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h index 839b3f01c1..da5e75c04b 100644 --- a/backends/platform/android/android.h +++ b/backends/platform/android/android.h @@ -144,6 +144,8 @@ private: FilesystemFactory *_fsFactory; timeval _startTime; + Common::String getSystemProperty(const char *name) const; + void initSurface(); void deinitSurface(); void initViewport(); -- cgit v1.2.3