diff options
| author | Karroffel | 2017-11-19 23:41:22 +0100 |
|---|---|---|
| committer | Karroffel | 2017-11-20 11:09:55 +0100 |
| commit | 0865365e21b9d5b33f12e48fb6f5f50e19f48e7d (patch) | |
| tree | e5f61c8b48a0c9afbf9de2126d2ae7a0e3798a14 /modules/gdnative/gdnative.cpp | |
| parent | f5e85c61039f8ff17805172c7a417747070bbc98 (diff) | |
| download | godot-0865365e21b9d5b33f12e48fb6f5f50e19f48e7d.tar.gz godot-0865365e21b9d5b33f12e48fb6f5f50e19f48e7d.tar.zst godot-0865365e21b9d5b33f12e48fb6f5f50e19f48e7d.zip | |
Diffstat (limited to 'modules/gdnative/gdnative.cpp')
| -rw-r--r-- | modules/gdnative/gdnative.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp index 44d6dffc8..7949ca182 100644 --- a/modules/gdnative/gdnative.cpp +++ b/modules/gdnative/gdnative.cpp @@ -109,6 +109,9 @@ Ref<GDNativeLibrary> GDNative::get_library() { return library; } +extern "C" void _gdnative_report_version_mismatch(const godot_object *p_library, const char *p_ext, godot_gdnative_api_version p_want, godot_gdnative_api_version p_have); +extern "C" void _gdnative_report_loading_error(const godot_object *p_library, const char *p_what); + bool GDNative::initialize() { if (library.is_null()) { ERR_PRINT("No library set, can't initialize GDNative object"); @@ -168,6 +171,8 @@ bool GDNative::initialize() { options.core_api_hash = ClassDB::get_api_hash(ClassDB::API_CORE); options.editor_api_hash = ClassDB::get_api_hash(ClassDB::API_EDITOR); options.no_api_hash = ClassDB::get_api_hash(ClassDB::API_NONE); + options.report_version_mismatch = &_gdnative_report_version_mismatch; + options.report_loading_error = &_gdnative_report_loading_error; options.gd_native_library = (godot_object *)(get_library().ptr()); options.active_library_path = (godot_string *)&path; |
