Merge pull request #47 from kazimaruf991/main

Fixed touch pad issue
This commit is contained in:
BrunoSX 2024-01-23 11:21:10 -03:00 committed by GitHub
commit f93c571468
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -398,6 +398,10 @@ public class InputControlsView extends View {
for (ControlElement element : profile.getElements()) if (element.handleTouchUp(pointerId)) handled = true;
if (!handled) touchpadView.onTouchEvent(event);
break;
case MotionEvent.ACTION_CANCEL:
for (ControlElement element : profile.getElements()) if (element.handleTouchUp(pointerId)) handled = true;
if (!handled) touchpadView.onTouchEvent(event);
break;
}
}
return true;

View File

@ -120,6 +120,9 @@ public class TouchpadView extends View {
numFingers--;
}
break;
case MotionEvent.ACTION_CANCEL:
numFingers = 0;
break;
}
return true;