1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Leverage java annotations to simplify the logic used to register the Godot plugin methods.

This commit is contained in:
Fredia Huya-Kouadio
2021-03-16 00:36:31 -07:00
parent a384fac953
commit 2d574bcc85
9 changed files with 243 additions and 64 deletions

View File

@@ -155,7 +155,7 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_setup(JNIEnv *env, jc
}
if (err != OK) {
return; //should exit instead and print the error
return; // should exit instead and print the error
}
java_class_wrapper = memnew(JavaClassWrapper(godot_java->get_activity()));
@@ -217,9 +217,10 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jcl
if (step == 1) {
if (!Main::start()) {
return; //should exit instead and print the error
return; // should exit instead and print the error
}
godot_java->on_godot_setup_completed(env);
os_android->main_loop_begin();
godot_java->on_godot_main_loop_started(env);
++step;