Merge pull request #37276 from Calinou/tweak-message-queue-max-size-hint
Tweak the message queue maximum size property hint
This commit is contained in:
commit
00e4f88e41
1 changed files with 2 additions and 2 deletions
|
@ -343,14 +343,14 @@ bool MessageQueue::is_flushing() const {
|
||||||
|
|
||||||
MessageQueue::MessageQueue() {
|
MessageQueue::MessageQueue() {
|
||||||
|
|
||||||
ERR_FAIL_COND_MSG(singleton != NULL, "MessageQueue singleton already exist.");
|
ERR_FAIL_COND_MSG(singleton != NULL, "A MessageQueue singleton already exists.");
|
||||||
singleton = this;
|
singleton = this;
|
||||||
flushing = false;
|
flushing = false;
|
||||||
|
|
||||||
buffer_end = 0;
|
buffer_end = 0;
|
||||||
buffer_max_used = 0;
|
buffer_max_used = 0;
|
||||||
buffer_size = GLOBAL_DEF_RST("memory/limits/message_queue/max_size_kb", DEFAULT_QUEUE_SIZE_KB);
|
buffer_size = GLOBAL_DEF_RST("memory/limits/message_queue/max_size_kb", DEFAULT_QUEUE_SIZE_KB);
|
||||||
ProjectSettings::get_singleton()->set_custom_property_info("memory/limits/message_queue/max_size_kb", PropertyInfo(Variant::INT, "memory/limits/message_queue/max_size_kb", PROPERTY_HINT_RANGE, "0,2048,1,or_greater"));
|
ProjectSettings::get_singleton()->set_custom_property_info("memory/limits/message_queue/max_size_kb", PropertyInfo(Variant::INT, "memory/limits/message_queue/max_size_kb", PROPERTY_HINT_RANGE, "1024,4096,1,or_greater"));
|
||||||
buffer_size *= 1024;
|
buffer_size *= 1024;
|
||||||
buffer = memnew_arr(uint8_t, buffer_size);
|
buffer = memnew_arr(uint8_t, buffer_size);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue