1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Distinguishs between dynamic library not found and can't be opened.

This commit is contained in:
Daylily-Zeleen
2024-01-01 19:48:28 +08:00
parent 13a0d6e9b2
commit fe6b073811
6 changed files with 12 additions and 4 deletions

View File

@@ -170,6 +170,8 @@ Error OS_Android::open_dynamic_library(const String p_path, void *&p_library_han
so_file_exists = false;
}
ERR_FAIL_COND_V(!FileAccess::exists(path), ERR_FILE_NOT_FOUND);
p_library_handle = dlopen(path.utf8().get_data(), RTLD_NOW);
if (!p_library_handle && so_file_exists) {
// The library may be on the sdcard and thus inaccessible. Try to copy it to the internal