mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 10:05:44 -04:00
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:
parent
b56f3ca9bb
commit
a7647a1ba1
@ -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 = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user