Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Support iPhone 5 launch images
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Oct 4, 2012
1 parent d338b5f commit 55da022
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/video/uikit/SDL_uikitappdelegate.m
Expand Up @@ -99,10 +99,14 @@ - (id)init
self->splash = [[UIImageView alloc] init];
[self setView:self->splash];

self->splashPortrait = [UIImage imageNamed:@"Default.png"];
CGSize size = [UIScreen mainScreen].bounds.size;
float height = SDL_max(size.width, size.height);
self->splashPortrait = [UIImage imageNamed:[NSString stringWithFormat:@"Default-%dh.png", (int)height]];
if (!self->splashPortrait) {
self->splashPortrait = [UIImage imageNamed:@"Default.png"];
}
self->splashLandscape = [UIImage imageNamed:@"Default-Landscape.png"];
if (!self->splashLandscape && self->splashPortrait)
{
if (!self->splashLandscape && self->splashPortrait) {
self->splashLandscape = [[UIImage alloc] initWithCGImage: self->splashPortrait.CGImage
scale: 1.0
orientation: UIImageOrientationRight];
Expand Down

0 comments on commit 55da022

Please sign in to comment.