mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
Add GDNativeInterface::get_library_path to GDExtension
This commit is contained in:
parent
574bf0b91b
commit
80f61352fb
19 changed files with 65 additions and 17 deletions
|
@ -221,10 +221,15 @@ bool OS_JavaScript::is_userfs_persistent() const {
|
|||
return idb_available;
|
||||
}
|
||||
|
||||
Error OS_JavaScript::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) {
|
||||
Error OS_JavaScript::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) {
|
||||
String path = p_path.get_file();
|
||||
p_library_handle = dlopen(path.utf8().get_data(), RTLD_NOW);
|
||||
ERR_FAIL_COND_V_MSG(!p_library_handle, ERR_CANT_OPEN, "Can't open dynamic library: " + p_path + ". Error: " + dlerror());
|
||||
|
||||
if (r_resolved_path != nullptr) {
|
||||
*r_resolved_path = path;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue