Skip to content

Commit

Permalink
better fix for warning around custom cursor shape
Browse files Browse the repository at this point in the history
  • Loading branch information
ogapo committed Apr 26, 2024
1 parent 6208859 commit aa3f5ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6888,7 +6888,9 @@ EditorNode::EditorNode() {
// Only if no touchscreen ui hint, disable emulation just in case.
Input::get_singleton()->set_emulate_touch_from_mouse(false);
}
DisplayServer::get_singleton()->cursor_set_custom_image(Ref<Resource>());
if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_CUSTOM_CURSOR_SHAPE)) {
DisplayServer::get_singleton()->cursor_set_custom_image(Ref<Resource>());
}
}

SceneState::set_disable_placeholders(true);
Expand Down
4 changes: 1 addition & 3 deletions servers/display_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,7 @@ DisplayServer::CursorShape DisplayServer::cursor_get_shape() const {
}

void DisplayServer::cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) {
if (p_cursor.is_valid() || p_shape != CURSOR_ARROW || !p_hotspot.is_zero_approx()) {
WARN_PRINT("Custom cursor shape not supported by this display server.");
}
WARN_PRINT("Custom cursor shape not supported by this display server.");
}

bool DisplayServer::get_swap_cancel_ok() {
Expand Down

0 comments on commit aa3f5ca

Please sign in to comment.