src/video/uikit/SDL_uikitappdelegate.m
changeset 6557 87ba88e3f2a9
parent 6556 d5e854f0d9a9
child 6587 4ef7c70295c9
equal deleted inserted replaced
6556:d5e854f0d9a9 6557:87ba88e3f2a9
    97     }
    97     }
    98 
    98 
    99     self->splash = [[UIImageView alloc] init];
    99     self->splash = [[UIImageView alloc] init];
   100     [self setView:self->splash];
   100     [self setView:self->splash];
   101 
   101 
   102     self->splashPortrait = [UIImage imageNamed:@"Default.png"];
   102     CGSize size = [UIScreen mainScreen].bounds.size;
       
   103     float height = SDL_max(size.width, size.height);
       
   104     self->splashPortrait = [UIImage imageNamed:[NSString stringWithFormat:@"Default-%dh.png", (int)height]];
       
   105     if (!self->splashPortrait) {
       
   106         self->splashPortrait = [UIImage imageNamed:@"Default.png"];
       
   107     }
   103     self->splashLandscape = [UIImage imageNamed:@"Default-Landscape.png"];
   108     self->splashLandscape = [UIImage imageNamed:@"Default-Landscape.png"];
   104     if (!self->splashLandscape && self->splashPortrait)
   109     if (!self->splashLandscape && self->splashPortrait) {
   105     {
       
   106         self->splashLandscape = [[UIImage alloc] initWithCGImage: self->splashPortrait.CGImage
   110         self->splashLandscape = [[UIImage alloc] initWithCGImage: self->splashPortrait.CGImage
   107                                                            scale: 1.0
   111                                                            scale: 1.0
   108                                                      orientation: UIImageOrientationRight];
   112                                                      orientation: UIImageOrientationRight];
   109     }
   113     }
   110     if (self->splashPortrait) {
   114     if (self->splashPortrait) {