[Scummvm-cvs-logs] SF.net SVN: scummvm:[50349] scummvm/trunk/common/translation.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Sun Jun 27 00:44:43 CEST 2010
Revision: 50349
http://scummvm.svn.sourceforge.net/scummvm/?rev=50349&view=rev
Author: lordhoto
Date: 2010-06-26 22:44:43 +0000 (Sat, 26 Jun 2010)
Log Message:
-----------
Fix compilation with our default build system when USE_DETECTLANG is specified.
Modified Paths:
--------------
scummvm/trunk/common/translation.cpp
Modified: scummvm/trunk/common/translation.cpp
===================================================================
--- scummvm/trunk/common/translation.cpp 2010-06-26 22:32:51 UTC (rev 50348)
+++ scummvm/trunk/common/translation.cpp 2010-06-26 22:44:43 UTC (rev 50349)
@@ -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 @@
// 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;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list