diff options
author | Emmanuel Leblond <emmanuel.leblond@gmail.com> | 2022-04-29 00:51:04 +0200 |
---|---|---|
committer | Emmanuel Leblond <emmanuel.leblond@gmail.com> | 2022-04-29 00:51:04 +0200 |
commit | 80f61352fb1b0bed251c06eb0a21a09374de77b3 (patch) | |
tree | 37e9cfe46ecd8757d3b21af2daea679194acccbf /platform/iphone | |
parent | 574bf0b91b848e6369d0a07a611d4decf88e668b (diff) |
Add GDNativeInterface::get_library_path to GDExtension
Diffstat (limited to 'platform/iphone')
-rw-r--r-- | platform/iphone/os_iphone.h | 2 | ||||
-rw-r--r-- | platform/iphone/os_iphone.mm | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/platform/iphone/os_iphone.h b/platform/iphone/os_iphone.h index 6a61f3a910..d03403bbb4 100644 --- a/platform/iphone/os_iphone.h +++ b/platform/iphone/os_iphone.h @@ -92,7 +92,7 @@ public: virtual void alert(const String &p_alert, const String &p_title = "ALERT!") override; - virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false) override; + virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false, String *r_resolved_path = nullptr) override; virtual Error close_dynamic_library(void *p_library_handle) override; virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional = false) override; diff --git a/platform/iphone/os_iphone.mm b/platform/iphone/os_iphone.mm index f7974c4b3d..95b06b728e 100644 --- a/platform/iphone/os_iphone.mm +++ b/platform/iphone/os_iphone.mm @@ -204,12 +204,17 @@ void OSIPhone::finalize() { // MARK: Dynamic Libraries -Error OSIPhone::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path) { +Error OSIPhone::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) { if (p_path.length() == 0) { p_library_handle = RTLD_SELF; + + if (r_resolved_path != nullptr) { + *r_resolved_path = p_path; + } + return OK; } - return OS_Unix::open_dynamic_library(p_path, p_library_handle, p_also_set_library_path); + return OS_Unix::open_dynamic_library(p_path, p_library_handle, p_also_set_library_path, r_resolved_path); } Error OSIPhone::close_dynamic_library(void *p_library_handle) { |