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 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'backends/platform/android/android.cpp') 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); -- cgit v1.2.3 From 0d9a852f464e484d5733de6268d6d0b917294120 Mon Sep 17 00:00:00 2001 From: dhewg Date: Sat, 19 Mar 2011 12:36:27 +0100 Subject: ANDROID: Implement OSystem::getSystemLanguage() --- backends/platform/android/android.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'backends/platform/android/android.cpp') diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp index 73b310c0bc..69b3f1e084 100644 --- a/backends/platform/android/android.cpp +++ b/backends/platform/android/android.cpp @@ -554,6 +554,12 @@ void OSystem_Android::logMessage(LogMessageType::Type type, } } +Common::String OSystem_Android::getSystemLanguage() const { + return Common::String::format("%s_%s", + getSystemProperty("persist.sys.language").c_str(), + getSystemProperty("persist.sys.country").c_str()); +} + Common::String OSystem_Android::getSystemProperty(const char *name) const { char value[PROP_VALUE_MAX]; -- cgit v1.2.3