src/video/uikit/SDL_uikitview.m
changeset 6439 fbbd640d7867
parent 6436 29a35c72905a
child 6518 42948831d16e
     1.1 --- a/src/video/uikit/SDL_uikitview.m	Tue Sep 18 22:24:40 2012 -0700
     1.2 +++ b/src/video/uikit/SDL_uikitview.m	Tue Sep 18 22:50:09 2012 -0700
     1.3 @@ -79,9 +79,6 @@
     1.4  - (CGPoint)touchLocation:(UITouch *)touch shouldNormalize:(BOOL)normalize
     1.5  {
     1.6      CGPoint point = [touch locationInView: self];
     1.7 -    CGRect frame = [self frame];
     1.8 -
     1.9 -    frame = CGRectApplyAffineTransform(frame, [self transform]);
    1.10  
    1.11      // Get the display scale and apply that to the input coordinates
    1.12      SDL_Window *window = self->viewcontroller.window;
    1.13 @@ -91,8 +88,9 @@
    1.14      point.y *= displaymodedata->scale;
    1.15      
    1.16      if (normalize) {
    1.17 -        point.x /= frame.size.width;
    1.18 -        point.y /= frame.size.height;
    1.19 +        CGRect bounds = [self bounds];
    1.20 +        point.x /= bounds.size.width;
    1.21 +        point.y /= bounds.size.height;
    1.22      }
    1.23      return point;
    1.24  }