project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m
changeset 6615 65602f1ef0f8
parent 6612 8fd6bb239a1e
child 6624 e049b5bb0ad1
--- a/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m	Mon Jan 30 07:51:30 2012 +0100
+++ b/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m	Mon Jan 30 23:20:28 2012 +0100
@@ -128,15 +128,9 @@
         width = screenBounds.size.width;
         height = screenBounds.size.height;
     } else {
-        CGRect screenBounds = [[UIScreen mainScreen] bounds];
-        UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
-        if ((orientation == UIInterfaceOrientationLandscapeLeft) || (orientation == UIInterfaceOrientationLandscapeRight)) {
-            width = screenBounds.size.height;
-            height = screenBounds.size.width;
-        } else {
-            width = screenBounds.size.width;
-            height = screenBounds.size.height;
-        }
+        CGRect screenBounds = [[UIScreen mainScreen] safeBounds];
+        width = screenBounds.size.width;
+        height = screenBounds.size.height;
     }
 
     NSString *horizontalSize = [[NSString alloc] initWithFormat:@"%d", (int)(width * screenScale)];