src/video/uikit/SDL_uikitview.m
branchiOS-improvements
changeset 9488 f15520430c94
parent 9487 f9fbc2d1edb0
child 9499 6fe9b44b2d84
     1.1 --- a/src/video/uikit/SDL_uikitview.m	Mon Jul 14 16:50:25 2014 -0300
     1.2 +++ b/src/video/uikit/SDL_uikitview.m	Mon Jul 14 22:35:48 2014 -0300
     1.3 @@ -65,19 +65,12 @@
     1.4  {
     1.5      CGPoint point = [touch locationInView: self];
     1.6  
     1.7 -    /* Get the display scale and apply that to the input coordinates */
     1.8 -    SDL_Window *window = viewcontroller.window;
     1.9 -    SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
    1.10 -    SDL_DisplayModeData *displaymodedata = (SDL_DisplayModeData *) display->current_mode.driverdata;
    1.11 -
    1.12      if (normalize) {
    1.13          CGRect bounds = [self bounds];
    1.14          point.x /= bounds.size.width;
    1.15          point.y /= bounds.size.height;
    1.16 -    } else {
    1.17 -        point.x *= displaymodedata->scale;
    1.18 -        point.y *= displaymodedata->scale;
    1.19      }
    1.20 +
    1.21      return point;
    1.22  }
    1.23  
    1.24 @@ -360,7 +353,6 @@
    1.25      int height = view.keyboardHeight;
    1.26      int offsetx = 0;
    1.27      int offsety = 0;
    1.28 -    float scale = [UIScreen mainScreen].scale;
    1.29      if (height) {
    1.30          int sw,sh;
    1.31          SDL_GetWindowSize(window,&sw,&sh);
    1.32 @@ -382,9 +374,6 @@
    1.33          offsety = -offsety;
    1.34      }
    1.35  
    1.36 -    offsetx /= scale;
    1.37 -    offsety /= scale;
    1.38 -
    1.39      view.frame = CGRectMake(offsetx,offsety,view.frame.size.width,view.frame.size.height);
    1.40  }
    1.41  
    1.42 @@ -412,7 +401,6 @@
    1.43                          if (ui_orient == UIInterfaceOrientationLandscapeRight || ui_orient == UIInterfaceOrientationLandscapeLeft) {
    1.44                              height = keyboardSize.width;
    1.45                          }
    1.46 -                        height *= [UIScreen mainScreen].scale;
    1.47                          _uikit_keyboard_set_height(height);
    1.48                      }
    1.49       ];