summaryrefslogtreecommitdiff
path: root/platform/osx
diff options
context:
space:
mode:
authorGuilherme Felipe <guilhermefelipecgs@gmail.com>2018-09-13 14:53:20 -0300
committerGuilherme Felipe <guilhermefelipecgs@gmail.com>2018-09-13 15:13:57 -0300
commit04aef23585376c3e648c086e39a58e7f5fd41f7d (patch)
treec84e962f26bca403c1324487b2e091c82091e5f5 /platform/osx
parentbcba5a99cdb2debcd9a595a4e9e905809f65da10 (diff)
Fix set_custom_mouse_cursor changing to incorrect cursor shape
[Docs] Add class ref for Input::set_default_cursor_shape
Diffstat (limited to 'platform/osx')
-rw-r--r--platform/osx/os_osx.mm6
1 files changed, 4 insertions, 2 deletions
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);
}
}