[PATCH] winex11.drv: LoadKeyboardLayout - return default locale in stub instead of 0
Nils Kuhnhenn
kuhnhenn.nils at gmail.com
Fri Aug 5 18:09:12 CDT 2016
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).aspx
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();
}
--
2.9.2
More information about the wine-patches
mailing list