Merge pull request #41327 from bruvzg/win_tablet_modifiers3
[Windows] Fix modifier keys when using tablet input.
This commit is contained in:
commit
2e7129c248
|
@ -557,8 +557,8 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
Ref<InputEventMouseMotion> mm;
|
Ref<InputEventMouseMotion> mm;
|
||||||
mm.instance();
|
mm.instance();
|
||||||
mm->set_control(GetKeyState(VK_CONTROL) != 0);
|
mm->set_control(GetKeyState(VK_CONTROL) < 0);
|
||||||
mm->set_shift(GetKeyState(VK_SHIFT) != 0);
|
mm->set_shift(GetKeyState(VK_SHIFT) < 0);
|
||||||
mm->set_alt(alt_mem);
|
mm->set_alt(alt_mem);
|
||||||
|
|
||||||
mm->set_pressure(last_pressure);
|
mm->set_pressure(last_pressure);
|
||||||
|
@ -699,8 +699,8 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
mm->set_tilt(Vector2((float)pen_info.tiltX / 90, (float)pen_info.tiltY / 90));
|
mm->set_tilt(Vector2((float)pen_info.tiltX / 90, (float)pen_info.tiltY / 90));
|
||||||
}
|
}
|
||||||
|
|
||||||
mm->set_control((wParam & MK_CONTROL) != 0);
|
mm->set_control(GetKeyState(VK_CONTROL) < 0);
|
||||||
mm->set_shift((wParam & MK_SHIFT) != 0);
|
mm->set_shift(GetKeyState(VK_SHIFT) < 0);
|
||||||
mm->set_alt(alt_mem);
|
mm->set_alt(alt_mem);
|
||||||
|
|
||||||
mm->set_button_mask(last_button_state);
|
mm->set_button_mask(last_button_state);
|
||||||
|
|
Loading…
Reference in New Issue