diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2022-01-13 09:23:53 +0000 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2022-01-13 15:23:21 +0000 |
commit | 5250cdd150dbffc1387d8cc60bee7977b322117a (patch) | |
tree | ff7ab7cbc45fc09d6553c8489685d3289572ae0c /platform/windows | |
parent | 8fce6166cbc635b069c09b782ea67c495348abcb (diff) |
Use mouse event relative motion to calculate mouse velocity
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/display_server_windows.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 091bed36ea..2768ec37e4 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -2078,7 +2078,6 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA mm->set_position(c); mm->set_global_position(c); - Input::get_singleton()->set_mouse_position(c); mm->set_velocity(Vector2(0, 0)); if (raw->data.mouse.usFlags == MOUSE_MOVE_RELATIVE) { @@ -2183,7 +2182,6 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA SetCursorPos(pos.x, pos.y); } - Input::get_singleton()->set_mouse_position(mm->get_position()); mm->set_velocity(Input::get_singleton()->get_last_mouse_velocity()); if (old_invalid) { @@ -2325,7 +2323,6 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA SetCursorPos(pos.x, pos.y); } - Input::get_singleton()->set_mouse_position(mm->get_position()); mm->set_velocity(Input::get_singleton()->get_last_mouse_velocity()); if (old_invalid) { @@ -2426,7 +2423,6 @@ LRESULT DisplayServerWindows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA SetCursorPos(pos.x, pos.y); } - Input::get_singleton()->set_mouse_position(mm->get_position()); mm->set_velocity(Input::get_singleton()->get_last_mouse_velocity()); if (old_invalid) { |