parent
8de1dc7e9a
commit
d645b80e46
1 changed files with 8 additions and 4 deletions
|
@ -855,15 +855,19 @@ void ScriptDebuggerRemote::_print_handler(void *p_this, const String &p_string)
|
||||||
}
|
}
|
||||||
|
|
||||||
sdr->char_count += allowed_chars;
|
sdr->char_count += allowed_chars;
|
||||||
|
bool overflowed = sdr->char_count >= sdr->max_cps;
|
||||||
if (sdr->char_count >= sdr->max_cps) {
|
|
||||||
s += "\n[output overflow, print less text!]\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
sdr->mutex->lock();
|
sdr->mutex->lock();
|
||||||
if (!sdr->locking && sdr->tcp_client->is_connected_to_host()) {
|
if (!sdr->locking && sdr->tcp_client->is_connected_to_host()) {
|
||||||
|
|
||||||
|
if (overflowed)
|
||||||
|
s += "[...]";
|
||||||
|
|
||||||
sdr->output_strings.push_back(s);
|
sdr->output_strings.push_back(s);
|
||||||
|
|
||||||
|
if (overflowed) {
|
||||||
|
sdr->output_strings.push_back("[output overflow, print less text!]");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sdr->mutex->unlock();
|
sdr->mutex->unlock();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue