Fix wxUILocale::GetPreferredUILanguages() under Windows < 10

Return the default locale name under old Windows versions instead of
always returning an empty vector and logging a spurious error.

See #23416.

(cherry picked from commit a242283456ffd0920a2384f6fee45d56a7ecc3a5)
This commit is contained in:
Brian Nixon 2023-04-04 17:15:21 +02:00 committed by Vadim Zeitlin
parent 148cafdcd0
commit 5150c1a1bd
2 changed files with 2 additions and 1 deletions

View File

@ -254,6 +254,7 @@ wxMSW:
- Fix setting locale for wxLANGUAGE_UKRAINIAN (Ulrich Telle, #23210).
- Don't reset custom wxToolBar background on system colour change (#23386).
- Fix wxUILocale::GetPreferredUILanguages() under < 10 (Brian Nixon, #23416).
wxOSX:

View File

@ -456,7 +456,7 @@ public:
{
// Use the default user locale for Windows 7 resp Windows 8.x and below
wchar_t buf[LOCALE_NAME_MAX_LENGTH];
if (!ms_GetUserDefaultLocaleName(buf, LOCALE_NAME_MAX_LENGTH))
if (ms_GetUserDefaultLocaleName(buf, LOCALE_NAME_MAX_LENGTH))
{
preferred.push_back(buf);
}