mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-16 08:05:34 -04:00
Fix[controls]: handle secondary pointer being removed
This commit is contained in:
parent
1d958abdab
commit
c963bc2b6c
@ -303,7 +303,9 @@ public class ControlLayout extends FrameLayout {
|
|||||||
ControlInterface lastControlButton = mapTable.get(v);
|
ControlInterface lastControlButton = mapTable.get(v);
|
||||||
|
|
||||||
//Check if the action is cancelling, reset the lastControl button associated to the view
|
//Check if the action is cancelling, reset the lastControl button associated to the view
|
||||||
if(ev.getActionMasked() == MotionEvent.ACTION_UP || ev.getActionMasked() == MotionEvent.ACTION_CANCEL){
|
if(ev.getActionMasked() == MotionEvent.ACTION_UP
|
||||||
|
|| ev.getActionMasked() == MotionEvent.ACTION_CANCEL
|
||||||
|
|| ev.getActionMasked() == MotionEvent.ACTION_POINTER_UP){
|
||||||
if(lastControlButton != null) lastControlButton.sendKeyPresses(false);
|
if(lastControlButton != null) lastControlButton.sendKeyPresses(false);
|
||||||
mapTable.put(v, null);
|
mapTable.put(v, null);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user