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

Cleanup Android input on render thread settings

Follow up to https://github.com/godotengine/godot/pull/93933
Clean up the set of settings use to control whether Android input should be dispatched on the render thread.

Addresses comments in https://github.com/godotengine/godot/pull/93933#issuecomment-2210437977
This commit is contained in:
Fredia Huya-Kouadio
2024-07-07 14:16:29 -07:00
parent f3af22b10b
commit 5e59819727
17 changed files with 63 additions and 89 deletions

View File

@@ -550,10 +550,11 @@ JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_onRendererPaused(JNIE
}
}
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_updateInputDispatchSettings(JNIEnv *env, jclass clazz, jboolean p_use_accumulated_input, jboolean p_use_input_buffering) {
if (Input::get_singleton()) {
Input::get_singleton()->set_use_accumulated_input(p_use_accumulated_input);
Input::get_singleton()->set_use_input_buffering(p_use_input_buffering);
JNIEXPORT jboolean JNICALL Java_org_godotengine_godot_GodotLib_shouldDispatchInputToRenderThread(JNIEnv *env, jclass clazz) {
Input *input = Input::get_singleton();
if (input) {
return !input->is_agile_input_event_flushing();
}
return false;
}
}