src/video/uikit/SDL_uikitview.m
changeset 8891 7b6472f1b7ba
parent 8583 fb2933ca805f
child 8983 21f5923cfd15
     1.1 --- a/src/video/uikit/SDL_uikitview.m	Sat Jun 21 12:38:46 2014 -0700
     1.2 +++ b/src/video/uikit/SDL_uikitview.m	Sat Jun 21 12:43:57 2014 -0700
     1.3 @@ -372,6 +372,7 @@
     1.4      int height = view.keyboardHeight;
     1.5      int offsetx = 0;
     1.6      int offsety = 0;
     1.7 +    float scale = [UIScreen mainScreen].scale;
     1.8      if (height) {
     1.9          int sw,sh;
    1.10          SDL_GetWindowSize(window,&sw,&sh);
    1.11 @@ -392,11 +393,10 @@
    1.12      if (ui_orient == UIInterfaceOrientationPortraitUpsideDown) {
    1.13          offsety = -offsety;
    1.14      }
    1.15 -    if ([[UIScreen mainScreen] respondsToSelector:@selector(displayLinkWithTarget:selector:)]) {
    1.16 -        float scale = [UIScreen mainScreen].scale;
    1.17 -        offsetx /= scale;
    1.18 -        offsety /= scale;
    1.19 -    }
    1.20 +
    1.21 +    offsetx /= scale;
    1.22 +    offsety /= scale;
    1.23 +
    1.24      view.frame = CGRectMake(offsetx,offsety,view.frame.size.width,view.frame.size.height);
    1.25  }
    1.26  
    1.27 @@ -424,9 +424,7 @@
    1.28                          if (ui_orient == UIInterfaceOrientationLandscapeRight || ui_orient == UIInterfaceOrientationLandscapeLeft) {
    1.29                              height = keyboardSize.width;
    1.30                          }
    1.31 -                        if ([[UIScreen mainScreen] respondsToSelector:@selector(displayLinkWithTarget:selector:)]) {
    1.32 -                            height *= [UIScreen mainScreen].scale;
    1.33 -                        }
    1.34 +                        height *= [UIScreen mainScreen].scale;
    1.35                          _uikit_keyboard_set_height(height);
    1.36                      }
    1.37       ];