mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-04 15:06:08 +00:00
Add handling for MotionEvent.FLAG_CANCELED
This commit is contained in:
@@ -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