summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scene/main/scene_tree.cpp2
-rw-r--r--scene/main/window.cpp33
-rw-r--r--scene/resources/visual_shader.cpp2
3 files changed, 32 insertions, 5 deletions
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index cafa4a43fd..0c92dcae11 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -1328,6 +1328,8 @@ SceneTree::SceneTree() {
root = memnew(Window);
root->set_process_mode(Node::PROCESS_MODE_PAUSABLE);
root->set_name("root");
+ root->set_title(ProjectSettings::get_singleton()->get("application/config/name"));
+
#ifndef _3D_DISABLED
if (!root->get_world_3d().is_valid()) {
root->set_world_3d(Ref<World3D>(memnew(World3D)));
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 532b457843..fbc0bc5301 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -41,7 +41,16 @@ void Window::set_title(const String &p_title) {
if (embedder) {
embedder->_sub_window_update(this);
} else if (window_id != DisplayServer::INVALID_WINDOW_ID) {
- DisplayServer::get_singleton()->window_set_title(atr(p_title), window_id);
+ String tr_title = atr(p_title);
+#ifdef DEBUG_ENABLED
+ if (window_id == DisplayServer::MAIN_WINDOW_ID) {
+ // Append a suffix to the window title to denote that the project is running
+ // from a debug build (including the editor). Since this results in lower performance,
+ // this should be clearly presented to the user.
+ tr_title = vformat("%s (DEBUG)", tr_title);
+ }
+#endif
+ DisplayServer::get_singleton()->window_set_title(tr_title, window_id);
}
}
@@ -234,7 +243,16 @@ void Window::_make_window() {
DisplayServer::get_singleton()->window_set_current_screen(current_screen, window_id);
DisplayServer::get_singleton()->window_set_max_size(max_size, window_id);
DisplayServer::get_singleton()->window_set_min_size(min_size, window_id);
- DisplayServer::get_singleton()->window_set_title(atr(title), window_id);
+ String tr_title = atr(title);
+#ifdef DEBUG_ENABLED
+ if (window_id == DisplayServer::MAIN_WINDOW_ID) {
+ // Append a suffix to the window title to denote that the project is running
+ // from a debug build (including the editor). Since this results in lower performance,
+ // this should be clearly presented to the user.
+ tr_title = vformat("%s (DEBUG)", tr_title);
+ }
+#endif
+ DisplayServer::get_singleton()->window_set_title(tr_title, window_id);
DisplayServer::get_singleton()->window_attach_instance_id(get_instance_id(), window_id);
_update_window_size();
@@ -773,7 +791,16 @@ void Window::_notification(int p_what) {
if (embedder) {
embedder->_sub_window_update(this);
} else if (window_id != DisplayServer::INVALID_WINDOW_ID) {
- DisplayServer::get_singleton()->window_set_title(atr(title), window_id);
+ String tr_title = atr(title);
+#ifdef DEBUG_ENABLED
+ if (window_id == DisplayServer::MAIN_WINDOW_ID) {
+ // Append a suffix to the window title to denote that the project is running
+ // from a debug build (including the editor). Since this results in lower performance,
+ // this should be clearly presented to the user.
+ tr_title = vformat("%s (DEBUG)", tr_title);
+ }
+#endif
+ DisplayServer::get_singleton()->window_set_title(tr_title, window_id);
}
child_controls_changed();
diff --git a/scene/resources/visual_shader.cpp b/scene/resources/visual_shader.cpp
index ece1ba1972..b485dcfcf1 100644
--- a/scene/resources/visual_shader.cpp
+++ b/scene/resources/visual_shader.cpp
@@ -3402,7 +3402,6 @@ bool VisualShaderNodeGroupBase::is_valid_port_name(const String &p_name) const {
}
void VisualShaderNodeGroupBase::add_input_port(int p_id, int p_type, const String &p_name) {
- ERR_FAIL_COND(has_input_port(p_id));
ERR_FAIL_INDEX(p_type, int(PORT_TYPE_MAX));
ERR_FAIL_COND(!is_valid_port_name(p_name));
@@ -3478,7 +3477,6 @@ bool VisualShaderNodeGroupBase::has_input_port(int p_id) const {
}
void VisualShaderNodeGroupBase::add_output_port(int p_id, int p_type, const String &p_name) {
- ERR_FAIL_COND(has_output_port(p_id));
ERR_FAIL_INDEX(p_type, int(PORT_TYPE_MAX));
ERR_FAIL_COND(!is_valid_port_name(p_name));