diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2019-01-11 16:53:11 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2019-01-11 16:53:11 +0200 |
commit | b7e9e184aa2309b024f11fd40326f387ead8beb7 (patch) | |
tree | 3f1b23b3cfe8a8eec709bf385e558541a9f9ce09 /platform | |
parent | 1b5b27430f36440c9f54f675d823c696f8eb3908 (diff) |
[macOS] Fix missing mouse move event speed.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/osx/os_osx.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 5880a0e0bd..ddd98ab88c 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -629,6 +629,7 @@ static void _mouseDownEvent(NSEvent *event, int index, int mask, bool pressed) { const Vector2 pos = get_mouse_pos([event locationInWindow], backingScaleFactor); mm->set_position(pos); mm->set_global_position(pos); + mm->set_speed(OS_OSX::singleton->input->get_last_mouse_speed()); Vector2 relativeMotion = Vector2(); relativeMotion.x = [event deltaX] * OS_OSX::singleton -> _mouse_scale(backingScaleFactor); relativeMotion.y = [event deltaY] * OS_OSX::singleton -> _mouse_scale(backingScaleFactor); @@ -1615,7 +1616,8 @@ void OS_OSX::set_cursor_shape(CursorShape p_shape) { case CURSOR_VSPLIT: [[NSCursor resizeUpDownCursor] set]; break; case CURSOR_HSPLIT: [[NSCursor resizeLeftRightCursor] set]; break; case CURSOR_HELP: [[NSCursor arrowCursor] set]; break; - default: {}; + default: { + }; } } |