From 04aef23585376c3e648c086e39a58e7f5fd41f7d Mon Sep 17 00:00:00 2001 From: Guilherme Felipe Date: Thu, 13 Sep 2018 14:53:20 -0300 Subject: Fix set_custom_mouse_cursor changing to incorrect cursor shape [Docs] Add class ref for Input::set_default_cursor_shape --- platform/osx/os_osx.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'platform/osx') diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index c0de4e3f2a..b98113baeb 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1662,7 +1662,7 @@ void OS_OSX::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c [cursors[p_shape] release]; cursors[p_shape] = cursor; - if (p_shape == CURSOR_ARROW) { + if (p_shape == cursor_shape) { [cursor set]; } @@ -1671,8 +1671,10 @@ void OS_OSX::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, c } else { // Reset to default system cursor cursors[p_shape] = NULL; + + CursorShape c = cursor_shape; cursor_shape = CURSOR_MAX; - set_cursor_shape(p_shape); + set_cursor_shape(c); } } -- cgit v1.2.3