mirror of
https://github.com/glfw/glfw.git
synced 2025-06-15 20:22:15 +00:00
Windows: avoid modifying the global keyboard state with ToUnicode
Since Windows 10 version 1607 we can make use of a new flag that makes ToUnicode operate on a process-private keyboard state. Reference: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-tounicode
This commit is contained in:
parent
7d060ba4f1
commit
b2ca22e51b
@ -487,13 +487,13 @@ void _glfwUpdateKeyNamesWin32(void)
|
||||
|
||||
length = ToUnicode(vk, scancode, state,
|
||||
chars, sizeof(chars) / sizeof(WCHAR),
|
||||
0);
|
||||
1 << 2);
|
||||
|
||||
if (length == -1)
|
||||
{
|
||||
length = ToUnicode(vk, scancode, state,
|
||||
chars, sizeof(chars) / sizeof(WCHAR),
|
||||
0);
|
||||
1 << 2);
|
||||
}
|
||||
|
||||
if (length < 1)
|
||||
|
Loading…
Reference in New Issue
Block a user