aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJohannes Schickel2010-06-26 22:44:43 +0000
committerJohannes Schickel2010-06-26 22:44:43 +0000
commit14fdd11c04c587f5fe2abe446c49d178957f53db (patch)
tree05a10b96c79f1524950c3e5643c017cdb22305cc /common
parent578cdb2aeb0beff80eb57b4d9fcc504a69593d42 (diff)
downloadscummvm-rg350-14fdd11c04c587f5fe2abe446c49d178957f53db.tar.gz
scummvm-rg350-14fdd11c04c587f5fe2abe446c49d178957f53db.tar.bz2
scummvm-rg350-14fdd11c04c587f5fe2abe446c49d178957f53db.zip
Fix compilation with our default build system when USE_DETECTLANG is specified.
svn-id: r50349
Diffstat (limited to 'common')
-rw-r--r--common/translation.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/common/translation.cpp b/common/translation.cpp
index c5e41b2ad3..1983c7652c 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -22,21 +22,23 @@
* $Id$
*/
-#ifdef USE_DETECTLANG
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
// winnt.h defines ARRAYSIZE, but we want our own one... - this is needed before including util.h
#undef ARRAYSIZE
-#else
-#include <locale.h>
-#endif // WIN32
#endif
#include "translation.h"
DECLARE_SINGLETON(Common::TranslationManager)
+#ifdef USE_DETECTLANG
+#ifndef WIN32
+#include <locale.h>
+#endif // !WIN32
+#endif
+
#ifdef USE_TRANSLATION
#include "messages.cpp"
#endif
@@ -67,8 +69,8 @@ TranslationManager::TranslationManager() {
// TODO: Check whether this (or ScummVM at all ;-) works on a system with Windows 98 for
// example and if it does not and we still want Windows 9x support, we should definitly
// think of another solution.
- if (GetLocaleInfo(languageIdentifier, LOCALE_SISO639LANGNAME, langName, ARRAYSIZE(langName)) != 0 &&
- GetLocaleInfo(languageIdentifier, LOCALE_SISO3166CTRYNAME, ctryName, ARRAYSIZE(ctryName)) != 0) {
+ if (GetLocaleInfo(languageIdentifier, LOCALE_SISO639LANGNAME, langName, sizeof(langName)) != 0 &&
+ GetLocaleInfo(languageIdentifier, LOCALE_SISO3166CTRYNAME, ctryName, sizeof(ctryName)) != 0) {
_syslang = langName;
_syslang += "_";
_syslang += ctryName;