Merge pull request #33423 from bruvzg/tablet_fixes
Fix graphic tablet input coordinates on Windows.
This commit is contained in:
commit
6a40b6767a
10
platform/windows/os_windows.cpp
Normal file → Executable file
10
platform/windows/os_windows.cpp
Normal file → Executable file
@ -556,8 +556,14 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
|
|
||||||
mm->set_button_mask(last_button_state);
|
mm->set_button_mask(last_button_state);
|
||||||
|
|
||||||
mm->set_position(Vector2(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)));
|
POINT coords; //client coords
|
||||||
mm->set_global_position(Vector2(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)));
|
coords.x = GET_X_LPARAM(lParam);
|
||||||
|
coords.y = GET_Y_LPARAM(lParam);
|
||||||
|
|
||||||
|
ScreenToClient(hWnd, &coords);
|
||||||
|
|
||||||
|
mm->set_position(Vector2(coords.x, coords.y));
|
||||||
|
mm->set_global_position(Vector2(coords.x, coords.y));
|
||||||
|
|
||||||
if (mouse_mode == MOUSE_MODE_CAPTURED) {
|
if (mouse_mode == MOUSE_MODE_CAPTURED) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user