mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-23 06:15:38 +00:00
Android: Possible fix for multi-touch-stuck issue
This commit is contained in:
parent
cb6502afa3
commit
e7bf22c31f
|
@ -93,10 +93,14 @@ public class TouchscreenControllerView extends FrameLayout {
|
|||
{
|
||||
Rect rect = new Rect();
|
||||
final int pointerCount = event.getPointerCount();
|
||||
final int liftedPointerIndex = (event.getActionMasked() == MotionEvent.ACTION_POINTER_UP) ? event.getActionIndex() : -1;
|
||||
for (TouchscreenControllerButtonView buttonView : mButtonViews) {
|
||||
buttonView.getHitRect(rect);
|
||||
boolean pressed = false;
|
||||
for (int i = 0; i < pointerCount; i++) {
|
||||
if (i == liftedPointerIndex)
|
||||
continue;
|
||||
|
||||
final int x = (int) event.getX(i);
|
||||
final int y = (int) event.getY(i);
|
||||
pressed |= rect.contains(x, y);
|
||||
|
|
Loading…
Reference in a new issue