https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9635f45bd4b088bf075eac...
commit 9635f45bd4b088bf075eac6b7b6870c964cd6a24 Author: Stanislav Motylkov x86corez@gmail.com AuthorDate: Sun Oct 24 20:10:28 2021 +0300 Commit: Stanislav Motylkov x86corez@gmail.com CommitDate: Sun Oct 24 23:42:14 2021 +0300
[SYSSETUP][INTL.CPL] Use GetGeoInfoW with current thread locale
Fixes inconsistency when thread locale differs from system or user locale. --- dll/cpl/intl/generalp.c | 4 ++-- dll/win32/syssetup/wizard.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dll/cpl/intl/generalp.c b/dll/cpl/intl/generalp.c index 8055e89edd4..76beeb0370a 100644 --- a/dll/cpl/intl/generalp.c +++ b/dll/cpl/intl/generalp.c @@ -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, diff --git a/dll/win32/syssetup/wizard.c b/dll/win32/syssetup/wizard.c index 330b0f2916b..6d7d5861061 100644 --- a/dll/win32/syssetup/wizard.c +++ b/dll/win32/syssetup/wizard.c @@ -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);