Support iPhone 5 launch images
This commit is contained in:
parent
76927d4175
commit
ad941c8027
1 changed files with 7 additions and 3 deletions
|
@ -99,10 +99,14 @@ static void SDL_IdleTimerDisabledChanged(const char *name, const char *oldValue,
|
||||||
self->splash = [[UIImageView alloc] init];
|
self->splash = [[UIImageView alloc] init];
|
||||||
[self setView:self->splash];
|
[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"];
|
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
|
self->splashLandscape = [[UIImage alloc] initWithCGImage: self->splashPortrait.CGImage
|
||||||
scale: 1.0
|
scale: 1.0
|
||||||
orientation: UIImageOrientationRight];
|
orientation: UIImageOrientationRight];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue