From dc187324beded208b8aef77d2e5e0cc1650f4d78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Fri, 13 Aug 2021 00:38:41 +0200 Subject: Add input buffering framework Input buffering is implicitly used by event accumulation, but this commit makes it more generic so it can be enabled for other uses. For desktop OSs it's currently not feasible given main and UI threads are the same). --- main/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'main') diff --git a/main/main.cpp b/main/main.cpp index 7351dafa22..8cfcacbfe8 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -2587,6 +2587,11 @@ bool Main::iteration() { iterating--; + // Needed for OSs using input buffering regardless accumulation (like Android) + if (Input::get_singleton()->is_using_input_buffering()) { + Input::get_singleton()->flush_buffered_events(); + } + if (fixed_fps != -1) { return exit; } -- cgit v1.2.3