summaryrefslogtreecommitdiffstats
path: root/core/extension
diff options
context:
space:
mode:
authorFredia Huya-Kouadio <fhuyakou@gmail.com>2024-04-19 07:14:05 -0700
committerFredia Huya-Kouadio <fhuyakou@gmail.com>2024-04-19 07:56:02 -0700
commit764de7fe3195c28be1d9b8abc26ffdf394e87cb3 (patch)
treeb31221f380e958f3bb1d92b38bae14423553cfdc /core/extension
parentede88cf59d20da54042f16df3fe6ab1aca760d64 (diff)
downloadredot-engine-764de7fe3195c28be1d9b8abc26ffdf394e87cb3.tar.gz
Collapse the gdextension arguments into the `GDExtensionData` struct
This is used to reduce the number of arguments to `OS::open_dynamic_library(...)`.
Diffstat (limited to 'core/extension')
-rw-r--r--core/extension/gdextension.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/extension/gdextension.cpp b/core/extension/gdextension.cpp
index 1735ee51a4..abf4adbc0d 100644
--- a/core/extension/gdextension.cpp
+++ b/core/extension/gdextension.cpp
@@ -773,7 +773,13 @@ Error GDExtension::open_library(const String &p_path, const String &p_entry_symb
}
String actual_lib_path;
- Error err = OS::get_singleton()->open_dynamic_library(abs_path, library, true, &actual_lib_path, Engine::get_singleton()->is_editor_hint(), &abs_dependencies_paths);
+ OS::GDExtensionData data = {
+ true, // also_set_library_path
+ &actual_lib_path, // r_resolved_path
+ Engine::get_singleton()->is_editor_hint(), // generate_temp_files
+ &abs_dependencies_paths, // library_dependencies
+ };
+ Error err = OS::get_singleton()->open_dynamic_library(abs_path, library, &data);
if (actual_lib_path.get_file() != abs_path.get_file()) {
// If temporary files are generated, let's change the library path to point at the original,