aboutsummaryrefslogtreecommitdiff
path: root/core/message_queue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/message_queue.cpp')
-rw-r--r--core/message_queue.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/message_queue.cpp b/core/message_queue.cpp
index c69021f4f..fe46e1671 100644
--- a/core/message_queue.cpp
+++ b/core/message_queue.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -45,7 +45,7 @@ Error MessageQueue::push_call(ObjectID p_id,const StringName& p_method,const Var
if ((buffer_end+room_needed) >= buffer_size) {
String type;
if (ObjectDB::get_instance(p_id))
- type=ObjectDB::get_instance(p_id)->get_type();
+ type=ObjectDB::get_instance(p_id)->get_class();
print_line("failed method: "+type+":"+p_method+" target ID: "+itos(p_id));
statistics();
@@ -98,7 +98,7 @@ Error MessageQueue::push_set(ObjectID p_id, const StringName& p_prop, const Vari
if ((buffer_end+room_needed) >= buffer_size) {
String type;
if (ObjectDB::get_instance(p_id))
- type=ObjectDB::get_instance(p_id)->get_type();
+ type=ObjectDB::get_instance(p_id)->get_class();
print_line("failed set: "+type+":"+p_prop+" target ID: "+itos(p_id));
statistics();
@@ -133,7 +133,7 @@ Error MessageQueue::push_notification(ObjectID p_id, int p_notification) {
if ((buffer_end+room_needed) >= buffer_size) {
String type;
if (ObjectDB::get_instance(p_id))
- type=ObjectDB::get_instance(p_id)->get_type();
+ type=ObjectDB::get_instance(p_id)->get_class();
print_line("failed notification: "+itos(p_notification)+" target ID: "+itos(p_id));
statistics();
@@ -320,7 +320,7 @@ void MessageQueue::_call_function(Object* p_target, const StringName& p_func, co
void MessageQueue::flush() {
- if (buffer_max_used<buffer_end); {
+ if (buffer_end > buffer_max_used) {
buffer_max_used=buffer_end;
//statistics();
}
@@ -398,7 +398,7 @@ MessageQueue::MessageQueue() {
buffer_end=0;
buffer_max_used=0;
- buffer_size=GLOBAL_DEF( "core/message_queue_size_kb", DEFAULT_QUEUE_SIZE_KB );
+ buffer_size=GLOBAL_DEF( "memory/buffers/message_queue_max_size_kb", DEFAULT_QUEUE_SIZE_KB );
buffer_size*=1024;
buffer = memnew_arr( uint8_t, buffer_size );
}