You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-21 14:57:09 +00:00
Switch to input buffering on Android
Key, touch and joystick events will be passed directly from the UI thread to Godot, so they can benefit from agile input flushing. As another consequence of this new way of passing events, less Java object are created at runtime (`Runnable`), which is good since the garbage collector needs to run less. `AndroidInputHandler` is introduced to have a smaller cross-thread surface. `main_loop_request_go_back()` is removed in favor just inline calling `send_window_event()` at the most caller's convenience (i.e., leveraging the new `p_deferred`` parameter as appropriate). Lastly, `get_mouse_position()` and `get_mouse_button_state()` now just call through `Input` to avoid the need of sync of mouse data tracked on the UI thread.
This commit is contained in:
@@ -188,10 +188,6 @@ void OS_Android::main_loop_focusin() {
|
||||
audio_driver_android.set_pause(false);
|
||||
}
|
||||
|
||||
void OS_Android::main_loop_request_go_back() {
|
||||
DisplayServerAndroid::get_singleton()->send_window_event(DisplayServer::WINDOW_EVENT_GO_BACK_REQUEST);
|
||||
}
|
||||
|
||||
Error OS_Android::shell_open(String p_uri) {
|
||||
return godot_io_java->open_uri(p_uri);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user