src/events/SDL_gesture.c
changeset 8705 fee2f7e242a1
parent 8296 cb13016bf07b
child 8726 9a5a5808aa14
     1.1 --- a/src/events/SDL_gesture.c	Thu Apr 17 17:24:27 2014 -0700
     1.2 +++ b/src/events/SDL_gesture.c	Thu Apr 17 19:52:15 2014 -0700
     1.3 @@ -137,7 +137,7 @@
     1.4      for (i = 0; i < SDL_numGestureTouches; i++) {
     1.5          SDL_GestureTouch* touch = &SDL_gestureTouch[i];
     1.6          for (j = 0; j < touch->numDollarTemplates; j++) {
     1.7 -            rtrn += SaveTemplate(&touch->dollarTemplate[i], dst);
     1.8 +            rtrn += SaveTemplate(&touch->dollarTemplate[j], dst);
     1.9          }
    1.10      }
    1.11      return rtrn;
    1.12 @@ -150,7 +150,7 @@
    1.13          SDL_GestureTouch* touch = &SDL_gestureTouch[i];
    1.14          for (j = 0; j < touch->numDollarTemplates; j++) {
    1.15              if (touch->dollarTemplate[i].hash == gestureId) {
    1.16 -                return SaveTemplate(&touch->dollarTemplate[i], dst);
    1.17 +                return SaveTemplate(&touch->dollarTemplate[j], dst);
    1.18              }
    1.19          }
    1.20      }
    1.21 @@ -454,8 +454,8 @@
    1.22      SDL_Event event;
    1.23      event.dgesture.type = SDL_DOLLARGESTURE;
    1.24      event.dgesture.touchId = touch->id;
    1.25 -    event.mgesture.x = touch->centroid.x;
    1.26 -    event.mgesture.y = touch->centroid.y;
    1.27 +    event.dgesture.x = touch->centroid.x;
    1.28 +    event.dgesture.y = touch->centroid.y;
    1.29      event.dgesture.gestureId = gestureId;
    1.30      event.dgesture.error = error;
    1.31      /* A finger came up to trigger this event. */