user32: Read "Layout Id" from registry in GetKeyboardLayoutList.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
66c3181444
commit
80985b7eec
|
@ -1336,8 +1336,8 @@ BOOL WINAPI BlockInput(BOOL fBlockIt)
|
||||||
*/
|
*/
|
||||||
UINT WINAPI GetKeyboardLayoutList( INT size, HKL *layouts )
|
UINT WINAPI GetKeyboardLayoutList( INT size, HKL *layouts )
|
||||||
{
|
{
|
||||||
WCHAR klid[KL_NAMELENGTH];
|
WCHAR klid[KL_NAMELENGTH], value[5];
|
||||||
UINT count, tmp, i = 0;
|
DWORD value_size, count, tmp, i = 0;
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
HKL layout;
|
HKL layout;
|
||||||
|
|
||||||
|
@ -1360,6 +1360,10 @@ UINT WINAPI GetKeyboardLayoutList( INT size, HKL *layouts )
|
||||||
while (!RegEnumKeyW( hkey, i++, klid, ARRAY_SIZE(klid) ))
|
while (!RegEnumKeyW( hkey, i++, klid, ARRAY_SIZE(klid) ))
|
||||||
{
|
{
|
||||||
tmp = wcstoul( klid, NULL, 16 );
|
tmp = wcstoul( klid, NULL, 16 );
|
||||||
|
value_size = sizeof(value);
|
||||||
|
if (!RegGetValueW( hkey, klid, L"Layout Id", RRF_RT_REG_SZ, NULL, (void *)&value, &value_size ))
|
||||||
|
tmp = MAKELONG( LOWORD( tmp ), 0xf000 | (wcstoul( value, NULL, 16 ) & 0xfff) );
|
||||||
|
|
||||||
if (layout == UlongToHandle( tmp )) continue;
|
if (layout == UlongToHandle( tmp )) continue;
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
|
Loading…
Reference in New Issue