Fix loading GDExtensions in exported games
This commit is contained in:
parent
fd7239cfab
commit
6d0a57c9fd
1 changed files with 3 additions and 5 deletions
|
@ -678,12 +678,10 @@ Error GDExtension::open_library(const String &p_path, const Ref<GDExtensionLoade
|
||||||
ERR_FAIL_NULL_V_MSG(p_loader, FAILED, "Can't open GDExtension without a loader.");
|
ERR_FAIL_NULL_V_MSG(p_loader, FAILED, "Can't open GDExtension without a loader.");
|
||||||
loader = p_loader;
|
loader = p_loader;
|
||||||
|
|
||||||
String abs_path = ProjectSettings::get_singleton()->globalize_path(p_path);
|
Error err = loader->open_library(p_path);
|
||||||
|
|
||||||
Error err = loader->open_library(abs_path);
|
ERR_FAIL_COND_V_MSG(err == ERR_FILE_NOT_FOUND, err, "GDExtension dynamic library not found: " + p_path);
|
||||||
|
ERR_FAIL_COND_V_MSG(err != OK, err, "Can't open GDExtension dynamic library: " + p_path);
|
||||||
ERR_FAIL_COND_V_MSG(err == ERR_FILE_NOT_FOUND, err, "GDExtension dynamic library not found: " + abs_path);
|
|
||||||
ERR_FAIL_COND_V_MSG(err != OK, err, "Can't open GDExtension dynamic library: " + abs_path);
|
|
||||||
|
|
||||||
err = loader->initialize(&gdextension_get_proc_address, this, &initialization);
|
err = loader->initialize(&gdextension_get_proc_address, this, &initialization);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue