summaryrefslogtreecommitdiffstats
path: root/platform/macos
diff options
context:
space:
mode:
authorMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2023-10-04 19:20:01 +0200
committerMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2024-02-05 23:30:15 +0100
commit2235a1cbd06440911c2679204dbc8b7d47b7e83f (patch)
tree5d8177bd57a670fe49d59f88847ebbf56d305ed1 /platform/macos
parentd3352813ea44447bfbf135efdec23acc4d1d3f89 (diff)
downloadredot-engine-2235a1cbd06440911c2679204dbc8b7d47b7e83f.tar.gz
Add screen-related attributes to mouse input events
Diffstat (limited to 'platform/macos')
-rw-r--r--platform/macos/godot_content_view.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/macos/godot_content_view.mm b/platform/macos/godot_content_view.mm
index 4505becbc2..f6f054c1e6 100644
--- a/platform/macos/godot_content_view.mm
+++ b/platform/macos/godot_content_view.mm
@@ -448,8 +448,10 @@
}
mm->set_global_position(wd.mouse_pos);
mm->set_velocity(Input::get_singleton()->get_last_mouse_velocity());
+ mm->set_screen_velocity(mm->get_velocity());
const Vector2i relativeMotion = Vector2i(delta.x, delta.y) * ds->screen_get_max_scale();
mm->set_relative(relativeMotion);
+ mm->set_relative_screen_position(relativeMotion);
ds->get_key_modifier_state([event modifierFlags], mm);
Input::get_singleton()->parse_input_event(mm);