mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2024-11-23 23:21:08 +01:00
L10N: Fixed a little bug in EP_L10N_ApplyPreferredLanguageForCurrentThread
This commit is contained in:
parent
72f1458afe
commit
a7a3d2727c
@ -48,11 +48,15 @@ BOOL EP_L10N_ApplyPreferredLanguageForCurrentThread()
|
||||
(LPBYTE)&dwPreferredLanguage,
|
||||
&dwSize
|
||||
);
|
||||
if (lres == ERROR_SUCCESS && dwSize > 0)
|
||||
if (lres == ERROR_SUCCESS && dwPreferredLanguage != 0)
|
||||
{
|
||||
EP_L10N_Language language = LangIDToEPLanguage(dwPreferredLanguage);
|
||||
EP_L10N_Language language = LangIDToEPLanguage((LANGID)dwPreferredLanguage);
|
||||
rv = SetThreadPreferredUILanguages(MUI_LANGUAGE_NAME, language.wszId, nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
rv = SetThreadPreferredUILanguages(MUI_LANGUAGE_NAME, nullptr, nullptr);
|
||||
}
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
return rv;
|
||||
|
Loading…
Reference in New Issue
Block a user