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.

Closes #23416.
This commit is contained in:
Brian Nixon 2023-04-04 17:15:21 +02:00 committed by Vadim Zeitlin
parent ff6201fe1d
commit a242283456

View file

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