Fixed incorrect function for setting environment variable in windows, which

resulted in the saved language not being used.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8203 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2011-04-03 23:20:17 +00:00
parent 8e169f5949
commit 5a43a98286
2 changed files with 3 additions and 2 deletions

View File

@ -724,7 +724,9 @@ void initUserConfig(char *argv[])
if (UserConfigParams::m_language.toString() != "system")
{
#ifdef WIN32
SetEnvironmentVariableA("LANGUAGE", UserConfigParams::m_language.c_str());
std::string s=std::string("LANGUAGE=")
+UserConfigParams::m_language.c_str();
_putenv(s.c_str());
#else
setenv("LANGUAGE", UserConfigParams::m_language.c_str(), 1);
#endif

View File

@ -226,7 +226,6 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name, cons
if (selection == "system")
{
#ifdef WIN32
SetEnvironmentVariable("LANGUAGE", "");
_putenv("LANGUAGE=");
#else
setenv( "LANGUAGE", "", 1);