mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +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:
parent
f3af22b10b
commit
5e59819727
17 changed files with 63 additions and 89 deletions
|
|
@ -2514,7 +2514,6 @@ error:
|
|||
memdelete(message_queue);
|
||||
}
|
||||
|
||||
OS::get_singleton()->benchmark_end_measure("Startup", "Core");
|
||||
OS::get_singleton()->benchmark_end_measure("Startup", "Main::Setup");
|
||||
|
||||
#if defined(STEAMAPI_ENABLED)
|
||||
|
|
@ -2926,7 +2925,8 @@ Error Main::setup2(bool p_show_boot_logo) {
|
|||
|
||||
Input *id = Input::get_singleton();
|
||||
if (id) {
|
||||
agile_input_event_flushing = GLOBAL_DEF("input_devices/buffering/agile_event_flushing", false);
|
||||
bool agile_input_event_flushing = GLOBAL_DEF("input_devices/buffering/agile_event_flushing", false);
|
||||
id->set_agile_input_event_flushing(agile_input_event_flushing);
|
||||
|
||||
if (bool(GLOBAL_DEF_BASIC("input_devices/pointing/emulate_touch_from_mouse", false)) &&
|
||||
!(editor || project_manager)) {
|
||||
|
|
@ -2939,8 +2939,6 @@ Error Main::setup2(bool p_show_boot_logo) {
|
|||
id->set_emulate_mouse_from_touch(bool(GLOBAL_DEF_BASIC("input_devices/pointing/emulate_mouse_from_touch", true)));
|
||||
}
|
||||
|
||||
GLOBAL_DEF("input_devices/buffering/android/use_accumulated_input", true);
|
||||
GLOBAL_DEF("input_devices/buffering/android/use_input_buffering", true);
|
||||
GLOBAL_DEF_BASIC("input_devices/pointing/android/enable_long_press_as_right_click", false);
|
||||
GLOBAL_DEF_BASIC("input_devices/pointing/android/enable_pan_and_scale_gestures", false);
|
||||
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "input_devices/pointing/android/rotary_input_scroll_axis", PROPERTY_HINT_ENUM, "Horizontal,Vertical"), 1);
|
||||
|
|
@ -3977,7 +3975,6 @@ uint32_t Main::hide_print_fps_attempts = 3;
|
|||
uint32_t Main::frame = 0;
|
||||
bool Main::force_redraw_requested = false;
|
||||
int Main::iterating = 0;
|
||||
bool Main::agile_input_event_flushing = false;
|
||||
|
||||
bool Main::is_iterating() {
|
||||
return iterating > 0;
|
||||
|
|
@ -4038,7 +4035,7 @@ bool Main::iteration() {
|
|||
NavigationServer3D::get_singleton()->sync();
|
||||
|
||||
for (int iters = 0; iters < advance.physics_steps; ++iters) {
|
||||
if (Input::get_singleton()->is_using_input_buffering() && agile_input_event_flushing) {
|
||||
if (Input::get_singleton()->is_agile_input_event_flushing()) {
|
||||
Input::get_singleton()->flush_buffered_events();
|
||||
}
|
||||
|
||||
|
|
@ -4095,7 +4092,7 @@ bool Main::iteration() {
|
|||
Engine::get_singleton()->_in_physics = false;
|
||||
}
|
||||
|
||||
if (Input::get_singleton()->is_using_input_buffering() && agile_input_event_flushing) {
|
||||
if (Input::get_singleton()->is_agile_input_event_flushing()) {
|
||||
Input::get_singleton()->flush_buffered_events();
|
||||
}
|
||||
|
||||
|
|
@ -4167,11 +4164,6 @@ bool Main::iteration() {
|
|||
|
||||
iterating--;
|
||||
|
||||
// Needed for OSs using input buffering regardless accumulation (like Android)
|
||||
if (Input::get_singleton()->is_using_input_buffering() && !agile_input_event_flushing) {
|
||||
Input::get_singleton()->flush_buffered_events();
|
||||
}
|
||||
|
||||
if (movie_writer) {
|
||||
movie_writer->add_frame();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ class Main {
|
|||
static uint32_t frame;
|
||||
static bool force_redraw_requested;
|
||||
static int iterating;
|
||||
static bool agile_input_event_flushing;
|
||||
|
||||
public:
|
||||
static bool is_cmdline_tool();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue