Explorar o código

Merge pull request #49848 from bruvzg/ccur_macos_fix

[macOS] Fix custom mouse cursor not set after mouse mode change.
Rémi Verschelde %!s(int64=4) %!d(string=hai) anos
pai
achega
659178e85f
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      platform/osx/display_server_osx.mm

+ 6 - 0
platform/osx/display_server_osx.mm

@@ -2120,6 +2120,12 @@ void DisplayServerOSX::mouse_set_mode(MouseMode p_mode) {
 	ignore_warp = true;
 	warp_events.clear();
 	mouse_mode = p_mode;
+
+	if (mouse_mode == MOUSE_MODE_VISIBLE || mouse_mode == MOUSE_MODE_CONFINED) {
+		CursorShape p_shape = cursor_shape;
+		cursor_shape = DisplayServer::CURSOR_MAX;
+		cursor_set_shape(p_shape);
+	}
 }
 
 DisplayServer::MouseMode DisplayServerOSX::mouse_get_mode() const {