From a267adfbce08af73e75abccd0a6b394e918955e2 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Tue, 17 Nov 2020 23:32:55 +1100 Subject: [PATCH] Mobile: Fix if you hold down finger to delete block, then move it slightly, it reverts to moving camera instead (Thanks fizzwhiz) --- src/Input.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Input.c b/src/Input.c index d099dc6ea..3d6158c5a 100644 --- a/src/Input.c +++ b/src/Input.c @@ -65,7 +65,11 @@ static void MouseStateRelease(int button); static cc_bool AnyBlockTouches(void) { int i; for (i = 0; i < Pointers_Count; i++) { - if (touches[i].type & TOUCH_TYPE_BLOCKS) return true; + if (!(touches[i].type & TOUCH_TYPE_BLOCKS)) continue; + + /* Touch might be an 'all' type - limit it to only 'block' type */ + touches[i].type = TOUCH_TYPE_BLOCKS; + return true; } return false; }