Skip to content

Commit

Permalink
90% of iOS users on the App Store run at least iOS 7, so it doesn't m…
Browse files Browse the repository at this point in the history
…ake sense to support building using an SDK that doesn't support iOS 7. The minimum supported runtime version is still iOS 5.1.
  • Loading branch information
slime73 committed Jul 23, 2014
1 parent 967549c commit 6d552ca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
7 changes: 2 additions & 5 deletions src/video/uikit/SDL_uikitopenglview.m
Expand Up @@ -75,14 +75,11 @@ - (id)initWithFrame:(CGRect)frame
return nil;
}

#ifdef __IPHONE_7_0
/* sRGB context support was added in iOS 7 */
BOOL hasiOS7 = [[UIDevice currentDevice].systemVersion compare:@"7.0" options:NSNumericSearch] != NSOrderedAscending;
if (sRGB && hasiOS7) {
/* sRGB EAGL drawable support was added in iOS 7 */
colorFormat = kEAGLColorFormatSRGBA8;
} else
#endif
if (rBits >= 8 && gBits >= 8 && bBits >= 8) {
} else if (rBits >= 8 && gBits >= 8 && bBits >= 8) {
/* if user specifically requests rbg888 or some color format higher than 16bpp */
colorFormat = kEAGLColorFormatRGBA8;
} else {
Expand Down
5 changes: 0 additions & 5 deletions src/video/uikit/SDL_uikitviewcontroller.m
Expand Up @@ -124,13 +124,8 @@ - (BOOL)prefersStatusBarHidden

- (UIStatusBarStyle)preferredStatusBarStyle
{
#ifdef __IPHONE_7_0
/* We assume most games don't have a bright white background. */
return UIStatusBarStyleLightContent;
#else
/* This method is only used in iOS 7+, so the return value here isn't important. */
return UIStatusBarStyleBlackTranslucent;
#endif
}

@end
Expand Down
3 changes: 1 addition & 2 deletions src/video/uikit/SDL_uikitwindow.m
Expand Up @@ -248,11 +248,10 @@ static int SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bo
[UIApplication sharedApplication].statusBarHidden = NO;
}

#ifdef __IPHONE_7_0
/* iOS 7+ won't update the status bar until we tell it to. */
if ([viewcontroller respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
[viewcontroller setNeedsStatusBarAppearanceUpdate];
}
#endif

if (fullscreen || (window->flags & SDL_WINDOW_BORDERLESS)) {
bounds = [displaydata->uiscreen bounds];
Expand Down

0 comments on commit 6d552ca

Please sign in to comment.