Fixed touch handling issues on Windows Phone when more than 2 fingers are used
for (int i = 0; i < _pointerStates.Count; i++) {
if (_pointerStates[i].pointerId == currentPoint.PointerId) {
_pointerStates.RemoveAt(i);
- break;
}
}
+ if (_pointerStates.Count >= 2) {
+ Log.Warn("MapView.OnPointerPressed: More than 2 pointers active");
+ }
PointerState state;
state.pointerId = currentPoint.PointerId;
state.pointerPoint = currentPoint;
- _pointerStates.Add(state);
+ _pointerStates.Insert(0, state);
UpdateInputCoordinates(_pointerStates.Count > 1 ? NativeActionPointer2Down : NativeActionPointer1Down);
args.Handled = true;
}
}
}
+ protected override void OnPointerCanceled(Windows.UI.Xaml.Input.PointerRoutedEventArgs args) {
+ _pointerStates.Clear();
+ UpdateInputCoordinates(NativeActionCancel);
+ args.Handled = true;
+ }
+
void OnSwapChainPanelSizeChanged(object sender, Windows.UI.Xaml.SizeChangedEventArgs args) {
lock (_swapChainPanelSizeLock) {
_swapChainPanelSize = new Windows.Foundation.Size(args.NewSize.Width, args.NewSize.Height);
