Skip to content

Commit

Permalink
myGMAP: fix exception on touchscreens
Browse files Browse the repository at this point in the history
  • Loading branch information
meee1 committed Jul 19, 2023
1 parent 3768acd commit b033164
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ExtLibs/Controls/myGMAP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ protected override void OnMouseMove(System.Windows.Forms.MouseEventArgs e)
private Point second_point = new Point();
PointLatLng first_pointLL = new PointLatLng();
PointLatLng second_pointLL = new PointLatLng();
private int iArguments = 0;
private Int64 iArguments = 0;
private const Int64 ULL_ARGUMENTS_BIT_MASK = 0xFFFFFFFFL;
private const int WM_GESTURENOTIFY = 0x11A;
private const int WM_GESTURE = 0x119;
Expand Down Expand Up @@ -292,7 +292,7 @@ private bool DecodeGesture(ref Message m)
{
case GF_BEGIN:
{
iArguments = System.Convert.ToInt32(gi.ullArguments & ULL_ARGUMENTS_BIT_MASK);
iArguments = System.Convert.ToInt64(gi.ullArguments & ULL_ARGUMENTS_BIT_MASK);
first_point.X = gi.ptsLocation.x;
first_point.Y = gi.ptsLocation.y;
first_pointLL = FromLocalToLatLng(PointToClient(first_point));
Expand All @@ -304,7 +304,7 @@ private bool DecodeGesture(ref Message m)
second_point.X = gi.ptsLocation.x;
second_point.Y = gi.ptsLocation.y;
second_pointLL = FromLocalToLatLng(PointToClient(second_point));
GestureHappened?.Invoke(this, new GestureEventArgs() { Operation = Gestures.Zoom, DistanceBetweenStart = iArguments, DistanceBetweenNow = System.Convert.ToInt32(gi.ullArguments & ULL_ARGUMENTS_BIT_MASK), FirstPoint = first_point, SecondPoint = second_point, FirstPointLL = first_pointLL, SecondPointLL = second_pointLL });
GestureHappened?.Invoke(this, new GestureEventArgs() { Operation = Gestures.Zoom, DistanceBetweenStart = (int)iArguments, DistanceBetweenNow = System.Convert.ToInt32(gi.ullArguments & ULL_ARGUMENTS_BIT_MASK), FirstPoint = first_point, SecondPoint = second_point, FirstPointLL = first_pointLL, SecondPointLL = second_pointLL });
break;
}
}
Expand Down

0 comments on commit b033164

Please sign in to comment.