summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/File.xml4
-rw-r--r--drivers/unix/socket_helpers.h7
-rw-r--r--editor/editor_inspector.cpp1
-rw-r--r--editor/editor_properties.cpp4
-rw-r--r--modules/mono/csharp_script.cpp6
-rw-r--r--scene/2d/canvas_item.cpp3
6 files changed, 19 insertions, 6 deletions
diff --git a/doc/classes/File.xml b/doc/classes/File.xml
index bd368e967a..78aa1b1a61 100644
--- a/doc/classes/File.xml
+++ b/doc/classes/File.xml
@@ -9,13 +9,13 @@
[codeblock]
func save(content):
var file = File.new()
- file.open("user://save_game.dat", file.WRITE)
+ file.open("user://save_game.dat", File.WRITE)
file.store_string(content)
file.close()
func load():
var file = File.new()
- file.open("user://save_game.dat", file.READ)
+ file.open("user://save_game.dat", File.READ)
var content = file.get_as_text()
file.close()
return content
diff --git a/drivers/unix/socket_helpers.h b/drivers/unix/socket_helpers.h
index 5ef9ad3088..5b42c13eae 100644
--- a/drivers/unix/socket_helpers.h
+++ b/drivers/unix/socket_helpers.h
@@ -124,6 +124,13 @@ static int _socket_create(IP::Type &p_type, int type, int protocol) {
WARN_PRINT("Unable to set/unset IPv4 address mapping over IPv6");
}
}
+ if (protocol == IPPROTO_UDP && p_type != IP::TYPE_IPV6) {
+ // Enable broadcasting for UDP sockets if it's not IPv6 only (IPv6 has no broadcast option).
+ int broadcast = 1;
+ if (setsockopt(sockfd, SOL_SOCKET, SO_BROADCAST, (char *)&broadcast, sizeof(broadcast)) != 0) {
+ WARN_PRINT("Error when enabling broadcasting");
+ }
+ }
return sockfd;
}
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 531aa2f9dc..a6f159ce34 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -1638,6 +1638,7 @@ void EditorInspector::register_text_enter(Node *p_line_edit) {
void EditorInspector::_filter_changed(const String &p_text) {
+ _clear();
update_tree();
}
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index c6d3a43f4e..c50187aa02 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -1023,8 +1023,8 @@ void EditorPropertyRect2::_value_changed(double val) {
Rect2 r2;
r2.position.x = spin[0]->get_value();
- r2.position.x = spin[1]->get_value();
- r2.size.y = spin[2]->get_value();
+ r2.position.y = spin[1]->get_value();
+ r2.size.x = spin[2]->get_value();
r2.size.y = spin[3]->get_value();
emit_signal("property_changed", get_edited_property(), r2);
}
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 3cfc376317..46c40b2690 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -1732,6 +1732,12 @@ void CSharpScript::_clear() {
Variant CSharpScript::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
+ if (unlikely(GDMono::get_singleton() == NULL)) {
+ // Probably not the best error but eh.
+ r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
+ return Variant();
+ }
+
GDMonoClass *top = script_class;
while (top && top != native) {
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp
index 27bdeda4a8..f1c09594da 100644
--- a/scene/2d/canvas_item.cpp
+++ b/scene/2d/canvas_item.cpp
@@ -272,8 +272,7 @@ bool CanvasItem::is_visible_in_tree() const {
void CanvasItem::_propagate_visibility_changed(bool p_visible) {
- if (!first_draw)
- notification(NOTIFICATION_VISIBILITY_CHANGED);
+ notification(NOTIFICATION_VISIBILITY_CHANGED);
if (p_visible)
update(); //todo optimize