summaryrefslogtreecommitdiffstats
path: root/platform/android/plugin/godot_plugin_jni.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/plugin/godot_plugin_jni.cpp')
-rw-r--r--platform/android/plugin/godot_plugin_jni.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/platform/android/plugin/godot_plugin_jni.cpp b/platform/android/plugin/godot_plugin_jni.cpp
index 5d48c4e248..fd60ba4ae7 100644
--- a/platform/android/plugin/godot_plugin_jni.cpp
+++ b/platform/android/plugin/godot_plugin_jni.cpp
@@ -129,31 +129,4 @@ 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_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 gdextension libraries.
- Array 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 < 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)) {
- singletons.push_back(path);
- }
- env->DeleteLocalRef(relative_path);
- }
-
- // Insert the updated list back into project settings.
- ProjectSettings::get_singleton()->set("gdextension/singletons", singletons);
-}
}