From a7647a1ba1a7eaadf53973eddc821bdfab6a1206 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 13 Feb 2021 10:24:06 +1100 Subject: [PATCH] Android: Fix if you hold finger to start deleting blocks, then switch to another app, then release finger in that app, then return to the game, you are stuck deleting blocks --- src/Input.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Input.c b/src/Input.c index 6c38ab2be..94daa0c9d 100644 --- a/src/Input.c +++ b/src/Input.c @@ -161,6 +161,8 @@ void Input_RemoveTouch(long id, int x, int y) { return; } } +#else +static void ClearTouches(void) { } #endif @@ -265,6 +267,8 @@ void Input_Clear(void) { for (i = 0; i < INPUT_COUNT; i++) { if (Input_Pressed[i]) Input_SetReleased(i); } + /* TODO: Properly release instead of just clearing */ + ClearTouches(); } @@ -1103,9 +1107,7 @@ static void OnInit(void) { } static void OnFree(void) { -#ifdef CC_BUILD_TOUCH ClearTouches(); -#endif } struct IGameComponent Input_Component = {