2016-08-06 1:09 GMT+02:00 Nils Kuhnhenn kuhnhenn.nils@gmail.com:
This matches the behavior of the original more closely, which returns the default locale in case of any error.
See the section "Return value" here: https://msdn.microsoft.com/en-us/library/windows/desktop/ms646305(v=vs.85).a...
Guild Wars 2 will repeat the call to "LoadKeyboardLayout" every frame if 0 is returned, followed by a call to "MapVirtualKeyEx" with the returned (unsupported) layout.
dlls/winex11.drv/keyboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index 47a9872..6f6eda8 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -1947,9 +1947,9 @@ HKL CDECL X11DRV_GetKeyboardLayout(DWORD dwThreadid) */ HKL CDECL X11DRV_LoadKeyboardLayout(LPCWSTR name, UINT flags) {
- FIXME("%s, %04x: stub!\n", debugstr_w(name), flags);
- FIXME("%s, %04x: stub! Returning default language.\n", debugstr_w(name), flags); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
- return get_locale_kbd_layout();
}
I'm not exactly an expert in the area but I think your patch makes sense. It's missing your sign-off though, please resend the patch with it. BTW, you can follow the status of your patch on http://source.winehq.org/patches/.