When high word is 0, and unless it has an explicit layout id.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- 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 );