mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Leverage java annotations to simplify the logic used to register the Godot plugin methods.
This commit is contained in:
parent
a384fac953
commit
2d574bcc85
9 changed files with 243 additions and 64 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue