diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/bind/core_bind.cpp | 2 | ||||
-rw-r--r-- | core/message_queue.cpp | 10 | ||||
-rw-r--r-- | core/message_queue.h | 4 | ||||
-rw-r--r-- | core/object.h | 1 | ||||
-rw-r--r-- | core/project_settings.cpp | 2 |
5 files changed, 16 insertions, 3 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 7a253ed85c..e81468e888 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -2423,7 +2423,7 @@ void _Thread::_start_func(void *ud) { } break; case Variant::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS: { - reason = "Too Many Arguments"; + reason = "Too Few Arguments"; } break; case Variant::CallError::CALL_ERROR_INVALID_METHOD: { diff --git a/core/message_queue.cpp b/core/message_queue.cpp index 7c3bdfec53..c57bd4081c 100644 --- a/core/message_queue.cpp +++ b/core/message_queue.cpp @@ -271,6 +271,9 @@ void MessageQueue::flush() { //using reverse locking strategy _THREAD_SAFE_LOCK_ + ERR_FAIL_COND(flushing); //already flushing, you did something odd + flushing = true; + while (read_pos < buffer_end) { //lock on each iteration, so a call can re-add itself to the message queue @@ -327,13 +330,20 @@ void MessageQueue::flush() { } buffer_end = 0; // reset buffer + flushing = false; _THREAD_SAFE_UNLOCK_ } +bool MessageQueue::is_flushing() const { + + return flushing; +} + MessageQueue::MessageQueue() { ERR_FAIL_COND(singleton != NULL); singleton = this; + flushing = false; buffer_end = 0; buffer_max_used = 0; diff --git a/core/message_queue.h b/core/message_queue.h index 696b8e2997..2515eb4a98 100644 --- a/core/message_queue.h +++ b/core/message_queue.h @@ -72,6 +72,8 @@ class MessageQueue { static MessageQueue *singleton; + bool flushing; + public: static MessageQueue *get_singleton(); @@ -87,6 +89,8 @@ public: void statistics(); void flush(); + bool is_flushing() const; + int get_max_buffer_usage() const; MessageQueue(); diff --git a/core/object.h b/core/object.h index 434cca0fec..a5bb6dea5d 100644 --- a/core/object.h +++ b/core/object.h @@ -118,6 +118,7 @@ enum PropertyUsageFlags { PROPERTY_USAGE_INTERNAL = 1 << 20, PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE = 1 << 21, // If the object is duplicated also this property will be duplicated PROPERTY_USAGE_HIGH_END_GFX = 1 << 22, + PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT = 1 << 23, PROPERTY_USAGE_DEFAULT = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK, PROPERTY_USAGE_DEFAULT_INTL = PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_NETWORK | PROPERTY_USAGE_INTERNATIONALIZED, diff --git a/core/project_settings.cpp b/core/project_settings.cpp index e325c828b8..8d05d7cc74 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -1163,8 +1163,6 @@ ProjectSettings::ProjectSettings() { GLOBAL_DEF("input/ui_end", action); input_presets.push_back("input/ui_end"); - //GLOBAL_DEF("display/window/handheld/orientation", "landscape"); - custom_prop_info["display/window/handheld/orientation"] = PropertyInfo(Variant::STRING, "display/window/handheld/orientation", PROPERTY_HINT_ENUM, "landscape,portrait,reverse_landscape,reverse_portrait,sensor_landscape,sensor_portrait,sensor"); custom_prop_info["rendering/threads/thread_model"] = PropertyInfo(Variant::INT, "rendering/threads/thread_model", PROPERTY_HINT_ENUM, "Single-Unsafe,Single-Safe,Multi-Threaded"); custom_prop_info["physics/2d/thread_model"] = PropertyInfo(Variant::INT, "physics/2d/thread_model", PROPERTY_HINT_ENUM, "Single-Unsafe,Single-Safe,Multi-Threaded"); |