Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DisplayServer overrides #91900

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions scene/main/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2667,8 +2667,6 @@ Node *Node::_duplicate(int p_flags, HashMap<const Node *, Node *> *r_duplimap) c
node->data.editable_instance = data.editable_instance;
}

StringName script_property_name = CoreStringName(script);

List<const Node *> hidden_roots;
List<const Node *> node_tree;
node_tree.push_front(this);
Expand Down Expand Up @@ -2865,7 +2863,7 @@ void Node::remap_nested_resources(Ref<Resource> p_resource, const HashMap<Ref<Re
void Node::_duplicate_properties(const Node *p_root, const Node *p_original, Node *p_copy, int p_flags) const {
List<PropertyInfo> props;
p_original->get_property_list(&props);
StringName script_property_name = CoreStringNames::get_singleton()->_script;
const StringName &script_property_name = CoreStringName(script);
if (p_flags & DUPLICATE_SCRIPTS) {
bool is_valid = false;
Variant scr = p_original->get(script_property_name, &is_valid);
Expand Down
5 changes: 2 additions & 3 deletions servers/display_server_headless.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,10 @@ class DisplayServerHeadless : public DisplayServer {
Error file_dialog_with_options_show(const String &p_title, const String &p_current_directory, const String &p_root, const String &p_filename, bool p_show_hidden, FileDialogMode p_mode, const Vector<String> &p_filters, const TypedArray<Dictionary> &p_options, const Callable &p_callback) override { return ERR_UNAVAILABLE; }

void release_rendering_thread() override {}
void make_rendering_thread() override {}
void swap_buffers() override {}

IndicatorID create_status_indicator(const Ref<Image> &p_icon, const String &p_tooltip, const Callable &p_callback) override { return INVALID_INDICATOR_ID; }
void status_indicator_set_icon(IndicatorID p_id, const Ref<Image> &p_icon) override {}
IndicatorID create_status_indicator(const Ref<Texture2D> &p_icon, const String &p_tooltip, const Callable &p_callback) override { return INVALID_INDICATOR_ID; }
void status_indicator_set_icon(IndicatorID p_id, const Ref<Texture2D> &p_icon) override {}
void status_indicator_set_tooltip(IndicatorID p_id, const String &p_tooltip) override {}
void status_indicator_set_callback(IndicatorID p_id, const Callable &p_callback) override {}
void delete_status_indicator(IndicatorID p_id) override {}
Expand Down
Loading