From 0324dd728e2c86395ca7b5f1ac622c69b066fdc5 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 ab3f93b2..8b63bf78 100644 --- a/desktop_version/src/KeyPoll.cpp +++ b/desktop_version/src/KeyPoll.cpp @@ -598,7 +598,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;