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

This commit is contained in:
UnknownShadow200 2021-02-13 10:24:06 +11:00
parent b56f3ca9bb
commit a7647a1ba1

View File

@ -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 = {