Rémi Bernon : user32: Duplicate klid to HKL high word in LoadKeyboardLayoutW.
Alexandre Julliard
julliard at winehq.org
Mon May 17 15:45:32 CDT 2021
Module: wine
Branch: master
Commit: 50ca64fcdf00e782213a541c7d128fdf5815a9e8
URL: https://source.winehq.org/git/wine.git/?a=commit;h=50ca64fcdf00e782213a541c7d128fdf5815a9e8
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Fri May 14 13:40:07 2021 +0200
user32: Duplicate klid to HKL high word in LoadKeyboardLayoutW.
When high word is 0, and unless it has an explicit layout id.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/input.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index 5d9bbe14cd6..ba0292c8f88 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -1548,7 +1548,8 @@ HKL WINAPI LoadKeyboardLayoutW( const WCHAR *name, UINT flags )
FIXME_(keyboard)( "name %s, flags %x, semi-stub!\n", debugstr_w( name ), flags );
tmp = wcstoul( name, NULL, 16 );
- layout = UlongToHandle( tmp );
+ if (HIWORD( tmp )) layout = UlongToHandle( tmp );
+ else layout = UlongToHandle( MAKELONG( LOWORD( tmp ), LOWORD( tmp ) ) );
wcscpy( layout_path, L"System\\CurrentControlSet\\Control\\Keyboard Layouts\\" );
wcscat( layout_path, name );
More information about the wine-cvs
mailing list