summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2021-08-13 00:38:41 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2021-08-13 11:19:19 +0200
commitdc187324beded208b8aef77d2e5e0cc1650f4d78 (patch)
tree1702509036e22af9b296d0b6b32dba4ac86b520c /main
parent7c864d41c9aa8c6b1c585175fc997af8070f6b30 (diff)
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).
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp5
1 files changed, 5 insertions, 0 deletions
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;
}