mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #56754 from madmiraal/fix-45592
This commit is contained in:
commit
57a057f7ff
5 changed files with 8 additions and 16 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue