project_files/HedgewarsMobile/Classes/OverlayViewController.m
changeset 6615 65602f1ef0f8
parent 6612 8fd6bb239a1e
child 6624 e049b5bb0ad1
--- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m	Mon Jan 30 07:51:30 2012 +0100
+++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m	Mon Jan 30 23:20:28 2012 +0100
@@ -65,13 +65,7 @@
 
 -(void) viewDidLoad {
     // fill all the screen available as sdlview disables autoresizing
-    CGRect rect = [[UIScreen mainScreen] bounds];
-    UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
-    if ((orientation == UIInterfaceOrientationLandscapeLeft) || (orientation == UIInterfaceOrientationLandscapeRight)) {
-        self.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width);
-    } else {
-        self.view.frame = CGRectMake(0, 0, rect.size.width, rect.size.height);
-    }
+    self.view.frame = [[UIScreen mainScreen] safeBounds];
     // the timer used to dim the overlay
     dimTimer = [[NSTimer alloc] initWithFireDate:(IS_DUALHEAD()) ? HIDING_TIME_NEVER : [NSDate dateWithTimeIntervalSinceNow:6]
                                         interval:1000