diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-12 11:43:59 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-12 11:43:59 +0100 |
commit | f1edd03d4caef60b8ae6ce787390c1cf19518244 (patch) | |
tree | 0e0977b13e8ba0766a7364a4cb75d6c5a1b094bb /platform/android/plugin/godot_plugin_jni.cpp | |
parent | a900383e57b982e6d16526d093db6e7a83c93405 (diff) | |
parent | be1c9d677d8bab3a14d4f966da313dd6d2dd3428 (diff) | |
download | redot-engine-f1edd03d4caef60b8ae6ce787390c1cf19518244.tar.gz |
Merge pull request #69718 from groud/finally_rename_gdnative_to_gdextension
Rename all gdnative occurences to gdextension
Diffstat (limited to 'platform/android/plugin/godot_plugin_jni.cpp')
-rw-r--r-- | platform/android/plugin/godot_plugin_jni.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/platform/android/plugin/godot_plugin_jni.cpp b/platform/android/plugin/godot_plugin_jni.cpp index 5a7123b833..fe35babba6 100644 --- a/platform/android/plugin/godot_plugin_jni.cpp +++ b/platform/android/plugin/godot_plugin_jni.cpp @@ -128,21 +128,21 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeEmitS singleton->emit_signalp(StringName(signal_name), args, count); } -JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDNativeLibraries(JNIEnv *env, jclass clazz, jobjectArray gdnlib_paths) { - int gdnlib_count = env->GetArrayLength(gdnlib_paths); - if (gdnlib_count == 0) { +JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegisterGDExtensionLibraries(JNIEnv *env, jclass clazz, jobjectArray gdextension_paths) { + int gdextension_count = env->GetArrayLength(gdextension_paths); + if (gdextension_count == 0) { return; } - // Retrieve the current list of gdnative libraries. + // Retrieve the current list of gdextension libraries. Array singletons; - if (ProjectSettings::get_singleton()->has_setting("gdnative/singletons")) { - singletons = GLOBAL_GET("gdnative/singletons"); + if (ProjectSettings::get_singleton()->has_setting("gdextension/singletons")) { + singletons = GLOBAL_GET("gdextension/singletons"); } // Insert the libraries provided by the plugin - for (int i = 0; i < gdnlib_count; i++) { - jstring relative_path = (jstring)env->GetObjectArrayElement(gdnlib_paths, i); + for (int i = 0; i < gdextension_count; i++) { + jstring relative_path = (jstring)env->GetObjectArrayElement(gdextension_paths, i); String path = "res://" + jstring_to_string(relative_path, env); if (!singletons.has(path)) { @@ -152,6 +152,6 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_plugin_GodotPlugin_nativeRegis } // Insert the updated list back into project settings. - ProjectSettings::get_singleton()->set("gdnative/singletons", singletons); + ProjectSettings::get_singleton()->set("gdextension/singletons", singletons); } } |