project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m
changeset 6615 65602f1ef0f8
parent 6612 8fd6bb239a1e
child 6624 e049b5bb0ad1
equal deleted inserted replaced
6614:f88f67a17a9d 6615:65602f1ef0f8
   126     if (IS_DUALHEAD()) {
   126     if (IS_DUALHEAD()) {
   127         CGRect screenBounds = [[[UIScreen screens] objectAtIndex:1] bounds];
   127         CGRect screenBounds = [[[UIScreen screens] objectAtIndex:1] bounds];
   128         width = screenBounds.size.width;
   128         width = screenBounds.size.width;
   129         height = screenBounds.size.height;
   129         height = screenBounds.size.height;
   130     } else {
   130     } else {
   131         CGRect screenBounds = [[UIScreen mainScreen] bounds];
   131         CGRect screenBounds = [[UIScreen mainScreen] safeBounds];
   132         UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
   132         width = screenBounds.size.width;
   133         if ((orientation == UIInterfaceOrientationLandscapeLeft) || (orientation == UIInterfaceOrientationLandscapeRight)) {
   133         height = screenBounds.size.height;
   134             width = screenBounds.size.height;
       
   135             height = screenBounds.size.width;
       
   136         } else {
       
   137             width = screenBounds.size.width;
       
   138             height = screenBounds.size.height;
       
   139         }
       
   140     }
   134     }
   141 
   135 
   142     NSString *horizontalSize = [[NSString alloc] initWithFormat:@"%d", (int)(width * screenScale)];
   136     NSString *horizontalSize = [[NSString alloc] initWithFormat:@"%d", (int)(width * screenScale)];
   143     NSString *verticalSize = [[NSString alloc] initWithFormat:@"%d", (int)(height * screenScale)];
   137     NSString *verticalSize = [[NSString alloc] initWithFormat:@"%d", (int)(height * screenScale)];
   144     NSString *resourcePath = [[NSString alloc] initWithFormat:@"%@/Data", [[NSBundle mainBundle] resourcePath]];
   138     NSString *resourcePath = [[NSString alloc] initWithFormat:@"%@/Data", [[NSBundle mainBundle] resourcePath]];