diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-01-24 10:05:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-24 10:05:42 +0100 |
commit | 57a057f7ff031f4593d851e351bc63fda77be535 (patch) | |
tree | ac7ea395e5872c16d8cddfa739b3cc81bae66c38 /platform | |
parent | b56d5b6e2fdfaf0a40c60b014f534820ba06c016 (diff) | |
parent | 5250cdd150dbffc1387d8cc60bee7977b322117a (diff) |
Merge pull request #56754 from madmiraal/fix-45592
Diffstat (limited to 'platform')
-rw-r--r-- | platform/javascript/display_server_javascript.cpp | 3 | ||||
-rw-r--r-- | platform/linuxbsd/display_server_x11.cpp | 1 | ||||
-rw-r--r-- | platform/osx/display_server_osx.mm | 1 | ||||
-rw-r--r-- | platform/windows/display_server_windows.cpp | 4 |
4 files changed, 0 insertions, 9 deletions
diff --git a/platform/javascript/display_server_javascript.cpp b/platform/javascript/display_server_javascript.cpp index e7564a599c..2842fc2f5e 100644 --- a/platform/javascript/display_server_javascript.cpp +++ b/platform/javascript/display_server_javascript.cpp @@ -137,7 +137,6 @@ int DisplayServerJavaScript::mouse_button_callback(int p_pressed, int p_button, DisplayServerJavaScript *ds = get_singleton(); Point2 pos(p_x, p_y); - Input::get_singleton()->set_mouse_position(pos); Ref<InputEventMouseButton> ev; ev.instantiate(); ev->set_position(pos); @@ -219,7 +218,6 @@ void DisplayServerJavaScript::mouse_move_callback(double p_x, double p_y, double } Point2 pos(p_x, p_y); - Input::get_singleton()->set_mouse_position(pos); Ref<InputEventMouseMotion> ev; ev.instantiate(); dom2godot_mod(ev, p_modifiers); @@ -229,7 +227,6 @@ void DisplayServerJavaScript::mouse_move_callback(double p_x, double p_y, double ev->set_global_position(pos); ev->set_relative(Vector2(p_rel_x, p_rel_y)); - Input::get_singleton()->set_mouse_position(ev->get_position()); ev->set_velocity(Input::get_singleton()->get_last_mouse_velocity()); Input::get_singleton()->parse_input_event(ev); diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp index 213553ab30..0ce627ca4f 100644 --- a/platform/linuxbsd/display_server_x11.cpp +++ b/platform/linuxbsd/display_server_x11.cpp @@ -3631,7 +3631,6 @@ void DisplayServerX11::process_events() { mm->set_button_mask((MouseButton)mouse_get_button_state()); mm->set_position(pos); mm->set_global_position(pos); - Input::get_singleton()->set_mouse_position(pos); mm->set_velocity(Input::get_singleton()->get_last_mouse_velocity()); mm->set_relative(rel); diff --git a/platform/osx/display_server_osx.mm b/platform/osx/display_server_osx.mm index 60f1eac4b1..1340aad9b2 100644 --- a/platform/osx/display_server_osx.mm +++ b/platform/osx/display_server_osx.mm @@ -787,7 +787,6 @@ static void _mouseDownEvent(DisplayServer::WindowID window_id, NSEvent *event, M mm->set_relative(relativeMotion); _get_key_modifier_state([event modifierFlags], mm); - Input::get_singleton()->set_mouse_position(wd.mouse_pos); Input::get_singleton()->parse_input_event(mm); } diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index bcddae45d8..c9e2251b35 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -2072,7 +2072,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) { @@ -2177,7 +2176,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) { @@ -2319,7 +2317,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) { @@ -2420,7 +2417,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) { |