Fix set_custom_mouse_cursor changing to incorrect cursor shape

[Docs] Add class ref for Input::set_default_cursor_shape
This commit is contained in:
Guilherme Felipe
2018-09-13 14:53:20 -03:00
parent bcba5a99cd
commit 04aef23585
4 changed files with 14 additions and 7 deletions

View File

@ -2311,7 +2311,7 @@ void OS_Windows::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shap
cursors[p_shape] = CreateIconIndirect(&iconinfo);
if (p_shape == CURSOR_ARROW) {
if (p_shape == cursor_shape) {
SetCursor(cursors[p_shape]);
}
@ -2328,8 +2328,10 @@ void OS_Windows::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shap
} 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);
}
}