diff options
Diffstat (limited to 'platform/web/os_web.cpp')
-rw-r--r-- | platform/web/os_web.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/platform/web/os_web.cpp b/platform/web/os_web.cpp index 45671ca491..ab4e7f8470 100644 --- a/platform/web/os_web.cpp +++ b/platform/web/os_web.cpp @@ -105,6 +105,10 @@ Error OS_Web::execute(const String &p_path, const List<String> &p_arguments, Str return create_process(p_path, p_arguments); } +Dictionary OS_Web::execute_with_pipe(const String &p_path, const List<String> &p_arguments) { + ERR_FAIL_V_MSG(Dictionary(), "OS::execute_with_pipe is not available on the Web platform."); +} + Error OS_Web::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id, bool p_open_console) { Array args; for (const String &E : p_arguments) { @@ -128,6 +132,10 @@ bool OS_Web::is_process_running(const ProcessID &p_pid) const { return false; } +int OS_Web::get_process_exit_code(const ProcessID &p_pid) const { + return -1; +} + int OS_Web::get_processor_count() const { return godot_js_os_hw_concurrency_get(); } @@ -239,13 +247,13 @@ bool OS_Web::is_userfs_persistent() const { return idb_available; } -Error OS_Web::open_dynamic_library(const String &p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) { +Error OS_Web::open_dynamic_library(const String &p_path, void *&p_library_handle, GDExtensionData *p_data) { String path = p_path.get_file(); p_library_handle = dlopen(path.utf8().get_data(), RTLD_NOW); ERR_FAIL_NULL_V_MSG(p_library_handle, ERR_CANT_OPEN, vformat("Can't open dynamic library: %s. Error: %s.", p_path, dlerror())); - if (r_resolved_path != nullptr) { - *r_resolved_path = path; + if (p_data != nullptr && p_data->r_resolved_path != nullptr) { + *p_data->r_resolved_path = path; } return OK; |