summaryrefslogtreecommitdiff
path: root/platform/android/api/api.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/api/api.cpp')
-rw-r--r--platform/android/api/api.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/android/api/api.cpp b/platform/android/api/api.cpp
index ef11b12971..4fe868d4f0 100644
--- a/platform/android/api/api.cpp
+++ b/platform/android/api/api.cpp
@@ -32,6 +32,7 @@
#include "core/engine.h"
#include "java_class_wrapper.h"
+#include "jni_singleton.h"
#if !defined(ANDROID_ENABLED)
static JavaClassWrapper *java_class_wrapper = nullptr;
@@ -40,7 +41,11 @@ static JavaClassWrapper *java_class_wrapper = nullptr;
void register_android_api() {
#if !defined(ANDROID_ENABLED)
+ // On Android platforms, the `java_class_wrapper` instantiation and the
+ // `JNISingleton` registration occurs in
+ // `platform/android/java_godot_lib_jni.cpp#Java_org_godotengine_godot_GodotLib_setup`
java_class_wrapper = memnew(JavaClassWrapper); // Dummy
+ ClassDB::register_class<JNISingleton>();
#endif
ClassDB::register_class<JavaClass>();