mirror of
https://github.com/godotengine/godot.git
synced 2025-10-26 03:04:31 +00:00
[HTML5] EditorRunNative works with GDNative.
This "breaks" our loading bar logic (libraries are not counted). Fixing it is non trivial and probably deserves investigating a different strategy.
This commit is contained in:
parent
ca34b5e57a
commit
611c4998e8
6 changed files with 65 additions and 17 deletions
|
|
@ -43,6 +43,7 @@
|
|||
#include "modules/websocket/remote_debugger_peer_websocket.h"
|
||||
#endif
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <emscripten.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
@ -187,6 +188,13 @@ 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) {
|
||||
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());
|
||||
return OK;
|
||||
}
|
||||
|
||||
OS_JavaScript *OS_JavaScript::get_singleton() {
|
||||
return static_cast<OS_JavaScript *>(OS::get_singleton());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue