mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-12-25 14:15:46 +00:00
Another correction, the prev. patch used the keyboard layout code, not country code.
Misnamed APIs are awful.
This commit is contained in:
parent
b71dc80516
commit
af30e508f5
1 changed files with 2 additions and 3 deletions
|
@ -658,7 +658,6 @@ void UserSettings::getSystemLocale()
|
||||||
}
|
}
|
||||||
#elif BBGE_BUILD_MACOSX
|
#elif BBGE_BUILD_MACOSX
|
||||||
CFLocaleRef locale = CFLocaleCopyCurrent();
|
CFLocaleRef locale = CFLocaleCopyCurrent();
|
||||||
CFArrayRef langs = CFLocaleCopyPreferredLanguages();
|
|
||||||
CFStringRef buf;
|
CFStringRef buf;
|
||||||
|
|
||||||
if ((buf = (CFStringRef)CFLocaleGetValue(locale, kCFLocaleLanguageCode)) != NULL)
|
if ((buf = (CFStringRef)CFLocaleGetValue(locale, kCFLocaleLanguageCode)) != NULL)
|
||||||
|
@ -666,7 +665,7 @@ void UserSettings::getSystemLocale()
|
||||||
system.locale = _CFToStdString(buf);
|
system.locale = _CFToStdString(buf);
|
||||||
CFRelease(buf);
|
CFRelease(buf);
|
||||||
|
|
||||||
if ((buf = (CFStringRef)CFArrayGetValueAtIndex(langs, 0)) != NULL)
|
if ((buf = (CFStringRef)CFLocaleGetValue(locale, kCFLocaleCountryCode)) != NULL)
|
||||||
{
|
{
|
||||||
system.locale += "_";
|
system.locale += "_";
|
||||||
system.locale += _CFToStdString(buf);
|
system.locale += _CFToStdString(buf);
|
||||||
|
@ -675,7 +674,7 @@ void UserSettings::getSystemLocale()
|
||||||
}
|
}
|
||||||
|
|
||||||
CFRelease(locale);
|
CFRelease(locale);
|
||||||
CFRelease(langs);
|
|
||||||
#else
|
#else
|
||||||
const char *lang = (const char *)getenv("LANG");
|
const char *lang = (const char *)getenv("LANG");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue