Add handling for cancelled touch events

This commit is contained in:
Cameron Gutman
2020-04-18 11:25:24 -07:00
parent 177ecdbe0b
commit f12e2f16dc

View File

@@ -332,6 +332,12 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
}
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
[dragTimer invalidate];
dragTimer = nil;
if (isDragging) {
isDragging = false;
LiSendMouseButtonEvent(BUTTON_ACTION_RELEASE, BUTTON_LEFT);
}
}
#if TARGET_OS_TV