mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
[DisplayServer] Add error messages and descriptions to callbacks.
This commit is contained in:
parent
be56cab58c
commit
714effdf07
11 changed files with 77 additions and 15 deletions
|
@ -1137,7 +1137,14 @@ void DisplayServerWayland::process_events() {
|
|||
WindowData wd = main_window;
|
||||
|
||||
if (wd.drop_files_callback.is_valid()) {
|
||||
wd.drop_files_callback.call(dropfiles_msg->files);
|
||||
Variant v_files = dropfiles_msg->files;
|
||||
const Variant *v_args[1] = { &v_files };
|
||||
Variant ret;
|
||||
Callable::CallError ce;
|
||||
wd.drop_files_callback.callp((const Variant **)&v_args, 1, ret, ce);
|
||||
if (ce.error != Callable::CallError::CALL_OK) {
|
||||
ERR_PRINT(vformat("Failed to execute drop files callback: %s.", Variant::get_callable_error_text(wd.drop_files_callback, v_args, 1, ce)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue