diff options
author | dhewg | 2011-03-19 12:36:27 +0100 |
---|---|---|
committer | dhewg | 2011-03-19 12:36:27 +0100 |
commit | 0d9a852f464e484d5733de6268d6d0b917294120 (patch) | |
tree | 74e6de3496ef0b59f353b2eb2ae0ba6162e92ecb /backends/platform/android | |
parent | 69e271225f43e7c6c34fbc9c1e0cf73afeedfe18 (diff) | |
download | scummvm-rg350-0d9a852f464e484d5733de6268d6d0b917294120.tar.gz scummvm-rg350-0d9a852f464e484d5733de6268d6d0b917294120.tar.bz2 scummvm-rg350-0d9a852f464e484d5733de6268d6d0b917294120.zip |
ANDROID: Implement OSystem::getSystemLanguage()
Diffstat (limited to 'backends/platform/android')
-rw-r--r-- | backends/platform/android/android.cpp | 6 | ||||
-rw-r--r-- | backends/platform/android/android.h | 1 |
2 files changed, 7 insertions, 0 deletions
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]; diff --git a/backends/platform/android/android.h b/backends/platform/android/android.h index da5e75c04b..eb05dbd390 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 |