[Scummvm-cvs-logs] scummvm master -> 0d9a852f464e484d5733de6268d6d0b917294120
dhewg
dhewg at wiibrew.org
Sat Mar 19 13:00:10 CET 2011
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
69e271225f ANDROID: Log some system properties
0d9a852f46 ANDROID: Implement OSystem::getSystemLanguage()
Commit: 69e271225f43e7c6c34fbc9c1e0cf73afeedfe18
https://github.com/scummvm/scummvm/commit/69e271225f43e7c6c34fbc9c1e0cf73afeedfe18
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T04:17:43-07:00
Commit Message:
ANDROID: Log some system properties
Changed paths:
backends/platform/android/android.cpp
backends/platform/android/android.h
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 6bb6de7..73b310c 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -27,6 +27,7 @@
#include <sys/time.h>
#include <sys/resource.h>
+#include <sys/system_properties.h>
#include <time.h>
#include <unistd.h>
@@ -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 839b3f0..da5e75c 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();
Commit: 0d9a852f464e484d5733de6268d6d0b917294120
https://github.com/scummvm/scummvm/commit/0d9a852f464e484d5733de6268d6d0b917294120
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-03-19T04:36:27-07:00
Commit Message:
ANDROID: Implement OSystem::getSystemLanguage()
Changed paths:
backends/platform/android/android.cpp
backends/platform/android/android.h
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 73b310c..69b3f1e 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];
diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h
index da5e75c..eb05dbd 100644
--- a/backends/platform/android/android.h
+++ b/backends/platform/android/android.h
@@ -282,6 +282,7 @@ public:
virtual void logMessage(LogMessageType::Type type, const char *message);
virtual void addSysArchivesToSearchSet(Common::SearchSet &s,
int priority = 0);
+ virtual Common::String getSystemLanguage() const;
};
#endif
More information about the Scummvm-git-logs
mailing list