From 6f79f730337244333271bf2991b034634359c593 Mon Sep 17 00:00:00 2001 From: NyakoFox Date: Tue, 2 Apr 2024 18:49:28 -0300 Subject: [PATCH] Ignore Android's back button when disabling touch Touch input automatically "disables" when you press a key on your keyboard. The back button on Android counts as a key press, so let's just ignore it. --- desktop_version/src/KeyPoll.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/desktop_version/src/KeyPoll.cpp b/desktop_version/src/KeyPoll.cpp index 655a70b0..a89f9986 100644 --- a/desktop_version/src/KeyPoll.cpp +++ b/desktop_version/src/KeyPoll.cpp @@ -618,7 +618,11 @@ void KeyPoll::Poll(void) switch (evt.type) { case SDL_KEYDOWN: - using_touch = false; + if (evt.key.keysym.sym != SDLK_AC_BACK) + { + // If we hit the back button on Android, this doesn't mean we're not using touch + using_touch = false; + } if (evt.key.repeat == 0) { hidemouse = true;