Fixed MXE builds after 87cf056158

On MXE, setlocale is a macro...
master
krzys-h 2015-03-21 17:34:18 +01:00
parent 2b21f5f40c
commit 9c20f275a0
1 changed files with 4 additions and 4 deletions

View File

@ -1683,9 +1683,9 @@ void CApplication::SetLanguage(Language language)
GetLogger()->Trace("SetLanguage: Set LANGUAGE=%s in environment\n", locale.c_str());
}
std::setlocale(LC_ALL, ""); // Load system locale
std::setlocale(LC_NUMERIC, "C"); // Force numeric locale to "C" (fixes decimal point problems)
char* systemLocale = std::setlocale(LC_ALL, nullptr); // Get current locale configuration
setlocale(LC_ALL, ""); // Load system locale
setlocale(LC_NUMERIC, "C"); // Force numeric locale to "C" (fixes decimal point problems)
char* systemLocale = setlocale(LC_ALL, nullptr); // Get current locale configuration
GetLogger()->Debug("System locale: %s\n", systemLocale);
// Update C++ locale
try
@ -1698,7 +1698,7 @@ void CApplication::SetLanguage(Language language)
try
{
std::locale::global(std::locale::classic());
std::setlocale(LC_ALL, systemLocale); // C locale might still work correctly
setlocale(LC_ALL, systemLocale); // C locale might still work correctly
}
catch(...)
{