[SYSSETUP][INTL.CPL] Use GetGeoInfoW with current thread locale

Fixes inconsistency when thread locale differs from system or user locale.
This commit is contained in:
Stanislav Motylkov 2021-10-24 20:10:28 +03:00
parent 4278f46620
commit 9635f45bd4
No known key found for this signature in database
GPG key ID: AFE513258CBA9E92
2 changed files with 3 additions and 3 deletions

View file

@ -1162,7 +1162,7 @@ LocationsEnumProc(GEOID gId)
WCHAR loc[MAX_STR_SIZE];
INT index;
if (GetGeoInfoW(gId, GEO_FRIENDLYNAME, loc, MAX_STR_SIZE, LANG_SYSTEM_DEFAULT) == 0)
if (GetGeoInfoW(gId, GEO_FRIENDLYNAME, loc, MAX_STR_SIZE, GetThreadLocale()) == 0)
return TRUE;
index = (INT)SendMessageW(hGeoList,
@ -1196,7 +1196,7 @@ CreateLocationsList(HWND hWnd)
GEO_FRIENDLYNAME,
loc,
MAX_STR_SIZE,
LANG_SYSTEM_DEFAULT);
GetThreadLocale());
SendMessageW(hGeoList,
CB_SELECTSTRING,

View file

@ -1095,7 +1095,7 @@ SetUserLocaleName(HWND hwnd)
WCHAR LocaleText[256 * 2];
GetLocaleInfoW(GetUserDefaultLCID(), LOCALE_SLANGUAGE, CurLocale, ARRAYSIZE(CurLocale));
GetGeoInfoW(GetUserGeoID(GEOCLASS_NATION), GEO_FRIENDLYNAME, CurGeo, ARRAYSIZE(CurGeo), LANG_SYSTEM_DEFAULT);
GetGeoInfoW(GetUserGeoID(GEOCLASS_NATION), GEO_FRIENDLYNAME, CurGeo, ARRAYSIZE(CurGeo), GetThreadLocale());
LoadStringW(hDllInstance, IDS_LOCALETEXT, ResText, ARRAYSIZE(ResText));
StringCchPrintfW(LocaleText, ARRAYSIZE(LocaleText), ResText, CurLocale, CurGeo);