mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-18 00:59:35 -04:00
Fix[touch]: pressing a passthrough button isn't considered a "cold start"
This commit is contained in:
parent
d676ca8d6a
commit
e7265671c6
@ -40,6 +40,7 @@ public class InGUIEventProcessor implements TouchEventProcessor {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MotionEvent.ACTION_UP:
|
case MotionEvent.ACTION_UP:
|
||||||
|
mTracker.cancelTracking();
|
||||||
disableMouse();
|
disableMouse();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -63,6 +63,7 @@ public class InGameEventProcessor implements TouchEventProcessor {
|
|||||||
break;
|
break;
|
||||||
case MotionEvent.ACTION_UP:
|
case MotionEvent.ACTION_UP:
|
||||||
case MotionEvent.ACTION_CANCEL:
|
case MotionEvent.ACTION_CANCEL:
|
||||||
|
mTracker.cancelTracking();
|
||||||
cancelGestures(false);
|
cancelGestures(false);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -17,6 +17,10 @@ public class PointerTracker {
|
|||||||
mLastY = motionEvent.getY();
|
mLastY = motionEvent.getY();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void cancelTracking() {
|
||||||
|
mColdStart = true;
|
||||||
|
}
|
||||||
|
|
||||||
public int trackEvent(MotionEvent motionEvent) {
|
public int trackEvent(MotionEvent motionEvent) {
|
||||||
int trackedPointerIndex = motionEvent.findPointerIndex(mTrackedPointerId);
|
int trackedPointerIndex = motionEvent.findPointerIndex(mTrackedPointerId);
|
||||||
int pointerCount = motionEvent.getPointerCount();
|
int pointerCount = motionEvent.getPointerCount();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user