diff options
| author | George Marques | 2017-11-14 20:01:45 -0200 |
|---|---|---|
| committer | George Marques | 2017-11-16 21:56:57 -0200 |
| commit | 1d12470a78d31a054aefc7f7c9a863db24b09986 (patch) | |
| tree | d020f85566491ff2975bf8084a8ad68f8b66d9ee /core/print_string.cpp | |
| parent | b44cb4e3b9b573a3cbbd6f71aff81e6c3465d84b (diff) | |
| download | godot-1d12470a78d31a054aefc7f7c9a863db24b09986.tar.gz godot-1d12470a78d31a054aefc7f7c9a863db24b09986.tar.zst godot-1d12470a78d31a054aefc7f7c9a863db24b09986.zip | |
Diffstat (limited to 'core/print_string.cpp')
| -rw-r--r-- | core/print_string.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/core/print_string.cpp b/core/print_string.cpp index 92a04cbf0..520fb3dae 100644 --- a/core/print_string.cpp +++ b/core/print_string.cpp @@ -82,7 +82,25 @@ void print_line(String p_string) { PrintHandlerList *l = print_handler_list; while (l) { - l->printfunc(l->userdata, p_string); + l->printfunc(l->userdata, p_string, false); + l = l->next; + } + + _global_unlock(); +} + +void print_error(String p_string) { + + if (!_print_error_enabled) + return; + + OS::get_singleton()->printerr("%s\n", p_string.utf8().get_data()); + + _global_lock(); + PrintHandlerList *l = print_handler_list; + while (l) { + + l->printfunc(l->userdata, p_string, true); l = l->next; } |
