mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-10-21 07:46:57 +00:00
Add handling for MotionEvent.FLAG_CANCELED
This commit is contained in:
1 parent
9fc5496526
commit
04954f5242
1 file changed
+8
-1
@@ -1451,7 +1451,14 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
||||
return true;
|
||||
}
|
||||
}
|
||||
context.touchUpEvent(eventX, eventY);
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU && (event.getFlags() & MotionEvent.FLAG_CANCELED) != 0) {
|
||||
context.cancelTouch();
|
||||
}
|
||||
else {
|
||||
context.touchUpEvent(eventX, eventY);
|
||||
}
|
||||
|
||||
for (TouchContext touchContext : touchContextMap) {
|
||||
touchContext.setPointerCount(event.getPointerCount() - 1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user