diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-08-17 14:37:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-17 14:37:55 +0200 |
commit | 261f2c1e03a9da03135e4406705cb51d7b5a4f7c (patch) | |
tree | af9a467417229ac5f277ac790da22412c776002e /platform/windows/display_server_windows.cpp | |
parent | a17fba3f21241beb68127d30b8d07db267e65e35 (diff) | |
parent | ee767757926b6418067f2fda60cbf942fa7c9d7d (diff) |
Merge pull request #41326 from bruvzg/win_tablet_modifiers4
[Windows] Fix modifier keys when using tablet input.
Diffstat (limited to 'platform/windows/display_server_windows.cpp')
-rw-r--r-- | platform/windows/display_server_windows.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index e4a7814cc1..cf7bebfbdf 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -2037,8 +2037,8 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA Ref<InputEventMouseMotion> mm; mm.instance(); mm->set_window_id(window_id); - mm->set_control(GetKeyState(VK_CONTROL) != 0); - mm->set_shift(GetKeyState(VK_SHIFT) != 0); + mm->set_control(GetKeyState(VK_CONTROL) < 0); + mm->set_shift(GetKeyState(VK_SHIFT) < 0); mm->set_alt(alt_mem); mm->set_pressure(windows[window_id].last_pressure); @@ -2180,8 +2180,8 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA mm->set_tilt(Vector2((float)pen_info.tiltX / 90, (float)pen_info.tiltY / 90)); } - mm->set_control((wParam & MK_CONTROL) != 0); - mm->set_shift((wParam & MK_SHIFT) != 0); + mm->set_control(GetKeyState(VK_CONTROL) < 0); + mm->set_shift(GetKeyState(VK_SHIFT) < 0); mm->set_alt(alt_mem); mm->set_button_mask(last_button_state); |