瀏覽代碼

[GDnative] Add active_library_path to init options struct

Emmanuel Leblond 8 年之前
父節點
當前提交
c55b8217ab
共有 2 個文件被更改,包括 2 次插入0 次删除
  1. 1 0
      modules/gdnative/gdnative.cpp
  2. 1 0
      modules/gdnative/include/gdnative/gdnative.h

+ 1 - 0
modules/gdnative/gdnative.cpp

@@ -269,6 +269,7 @@ bool GDNative::initialize() {
 	options.editor_api_hash = ClassDB::get_api_hash(ClassDB::API_EDITOR);
 	options.no_api_hash = ClassDB::get_api_hash(ClassDB::API_NONE);
 	options.gd_native_library = (godot_object *)(get_library().ptr());
+	options.active_library_path = (godot_string *)&path;
 
 	library_init_fpointer(&options);
 

+ 1 - 0
modules/gdnative/include/gdnative/gdnative.h

@@ -243,6 +243,7 @@ typedef struct {
 	uint64_t no_api_hash;
 	godot_object *gd_native_library; // pointer to GDNativeLibrary that is being initialized
 	const struct godot_gdnative_api_struct *api_struct;
+	const godot_string *active_library_path;
 } godot_gdnative_init_options;
 
 typedef struct {