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:
parent
8e169f5949
commit
5a43a98286
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user