summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-07-17 11:42:52 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-07-17 11:42:52 +0200
commit496fd12b17592ae258028e9c76f0eddf3d9fbbec (patch)
tree3a6dca15dfd1a65238a488d3a3c1c45b96b7c030 /main
parentdb95973d63abef1d973627426ca5e727b186ee4b (diff)
parent5e598197274d983c4b8460d58158a77a94bdd4a2 (diff)
downloadredot-engine-496fd12b17592ae258028e9c76f0eddf3d9fbbec.tar.gz
Merge pull request #94052 from m4gr3d/clean_input_dispatch_settings
Cleanup Android input on render thread settings
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp16
-rw-r--r--main/main.h1
2 files changed, 4 insertions, 13 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 32eb32142d..cfa0f9dfda 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -2516,7 +2516,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)
@@ -2928,7 +2927,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)) {
@@ -2941,8 +2941,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);
@@ -3979,7 +3977,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;
@@ -4040,7 +4037,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();
}
@@ -4097,7 +4094,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();
}
@@ -4169,11 +4166,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();
}
diff --git a/main/main.h b/main/main.h
index b1cfcd3c2d..6dd2ff7d7a 100644
--- a/main/main.h
+++ b/main/main.h
@@ -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();