You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix flickering issues with low processor mode on Android
This commit is contained in:
@@ -213,9 +213,9 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_back(JNIEnv *env, jcl
|
||||
}
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jclass clazz) {
|
||||
JNIEXPORT jboolean JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jclass clazz) {
|
||||
if (step.get() == -1) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (step.get() == 0) {
|
||||
@@ -224,12 +224,12 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jcl
|
||||
Main::setup2(Thread::get_caller_id());
|
||||
input_handler = new AndroidInputHandler();
|
||||
step.increment();
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (step.get() == 1) {
|
||||
if (!Main::start()) {
|
||||
return; // should exit instead and print the error
|
||||
return true; // should exit instead and print the error
|
||||
}
|
||||
|
||||
godot_java->on_godot_setup_completed(env);
|
||||
@@ -243,9 +243,12 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_step(JNIEnv *env, jcl
|
||||
DisplayServerAndroid::get_singleton()->process_magnetometer(magnetometer);
|
||||
DisplayServerAndroid::get_singleton()->process_gyroscope(gyroscope);
|
||||
|
||||
if (os_android->main_loop_iterate()) {
|
||||
bool should_swap_buffers = false;
|
||||
if (os_android->main_loop_iterate(&should_swap_buffers)) {
|
||||
godot_java->force_quit(env);
|
||||
}
|
||||
|
||||
return should_swap_buffers;
|
||||
}
|
||||
|
||||
void touch_preprocessing(JNIEnv *env, jclass clazz, jint input_device, jint ev, jint pointer, jint pointer_count, jfloatArray positions, jint buttons_mask, jfloat vertical_factor, jfloat horizontal_factor) {
|
||||
|
||||
Reference in New Issue
Block a user