diff options
author | Johannes Schickel | 2010-11-28 02:12:33 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-11-28 02:12:33 +0000 |
commit | 1ad63b431ee031c0d4bb6d520d70103a60459d55 (patch) | |
tree | fb519ea3bf4a9f73ae832f57c0c08f62e7ecfd44 /backends/platform/sdl | |
parent | 5f7ac43a24094ce3fa87e3fc01d8f9f333233631 (diff) | |
download | scummvm-rg350-1ad63b431ee031c0d4bb6d520d70103a60459d55.tar.gz scummvm-rg350-1ad63b431ee031c0d4bb6d520d70103a60459d55.tar.bz2 scummvm-rg350-1ad63b431ee031c0d4bb6d520d70103a60459d55.zip |
BACKEND: Switch OSystem::getSystemLanguage return type to Common::String.
This is done as discussed on -devel.
svn-id: r54516
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 12 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 978f394963..da6542f9e2 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -699,7 +699,7 @@ void OSystem_SDL::logMessage(LogMessageType::Type type, const char *message) { #endif } -Common::Language OSystem_SDL::getSystemLanguage() const { +Common::String OSystem_SDL::getSystemLanguage() const { #ifdef USE_DETECTLANG #ifdef WIN32 // We can not use "setlocale" (at least not for MSVC builds), since it @@ -727,9 +727,9 @@ Common::Language OSystem_SDL::getSystemLanguage() const { localeName += "_"; localeName += ctryName; - return Common::parseLanguageFromLocale(localeName.c_str()); + return localeName; } else { - return Common::UNK_LANG; + return BaseBackend::getSystemLanguage(); } #else // WIN32 // Activating current locale settings @@ -737,7 +737,7 @@ Common::Language OSystem_SDL::getSystemLanguage() const { // Detect the language from the locale if (!locale) { - return Common::UNK_LANG; + return BaseBackend::getSystemLanguage(); } else { int length = 0; @@ -752,11 +752,11 @@ Common::Language OSystem_SDL::getSystemLanguage() const { break; } - return Common::parseLanguageFromLocale(Common::String(locale, length).c_str()); + return Common::String(locale, length); } #endif // WIN32 #else // USE_DETECTLANG - return Common::UNK_LANG; + return BaseBackend::getSystemLanguage(); #endif // USE_DETECTLANG } diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h index 7fc46dacb1..48797ab238 100644 --- a/backends/platform/sdl/sdl.h +++ b/backends/platform/sdl/sdl.h @@ -195,7 +195,7 @@ public: // Logging virtual void logMessage(LogMessageType::Type type, const char *message); - virtual Common::Language getSystemLanguage() const; + virtual Common::String getSystemLanguage() const; void deinit(); |