Commit 42100f2d authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

win32u: Init vsc2char in NtUserMapVirtualKeyEx only if necessary.

parent 9a3e6ca3
......@@ -1042,8 +1042,6 @@ UINT WINAPI NtUserMapVirtualKeyEx( UINT code, UINT type, HKL layout )
if ((ret = user_driver->pMapVirtualKeyEx( code, type, layout )) != -1) return ret;
kbd_tables_init_vk2char( kbd_tables, vk2char );
switch (type)
{
case MAPVK_VK_TO_VSC_EX:
......@@ -1096,6 +1094,7 @@ UINT WINAPI NtUserMapVirtualKeyEx( UINT code, UINT type, HKL layout )
}
break;
case MAPVK_VK_TO_CHAR:
kbd_tables_init_vk2char( kbd_tables, vk2char );
if (code >= ARRAY_SIZE(vk2char)) ret = 0;
else if (code >= 'A' && code <= 'Z') ret = code;
else ret = vk2char[code];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment