project_files/HedgewarsMobile/Classes/OverlayViewController.m
changeset 6612 8fd6bb239a1e
parent 6268 d773867f93db
child 6615 65602f1ef0f8
equal deleted inserted replaced
6611:d9d00e537010 6612:8fd6bb239a1e
    64 }
    64 }
    65 
    65 
    66 -(void) viewDidLoad {
    66 -(void) viewDidLoad {
    67     // fill all the screen available as sdlview disables autoresizing
    67     // fill all the screen available as sdlview disables autoresizing
    68     CGRect rect = [[UIScreen mainScreen] bounds];
    68     CGRect rect = [[UIScreen mainScreen] bounds];
    69     self.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width);
    69     UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
    70 
    70     if ((orientation == UIInterfaceOrientationLandscapeLeft) || (orientation == UIInterfaceOrientationLandscapeRight)) {
       
    71         self.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width);
       
    72     } else {
       
    73         self.view.frame = CGRectMake(0, 0, rect.size.width, rect.size.height);
       
    74     }
    71     // the timer used to dim the overlay
    75     // the timer used to dim the overlay
    72     dimTimer = [[NSTimer alloc] initWithFireDate:(IS_DUALHEAD()) ? HIDING_TIME_NEVER : [NSDate dateWithTimeIntervalSinceNow:6]
    76     dimTimer = [[NSTimer alloc] initWithFireDate:(IS_DUALHEAD()) ? HIDING_TIME_NEVER : [NSDate dateWithTimeIntervalSinceNow:6]
    73                                         interval:1000
    77                                         interval:1000
    74                                           target:self
    78                                           target:self
    75                                         selector:@selector(dimOverlay)
    79                                         selector:@selector(dimOverlay)