90% of iOS users on the App Store run at least iOS 7, so it doesn't make sense to support building using an SDK that doesn't support iOS 7. The minimum supported runtime version is still iOS 5.1. iOS-improvements
authorAlex Szpakowski <slime73@gmail.com>
Wed, 23 Jul 2014 01:33:59 -0300
branchiOS-improvements
changeset 9500 cbf5c5ecf5ac
parent 9499 6fe9b44b2d84
child 9501 574db299498f
90% of iOS users on the App Store run at least iOS 7, so it doesn't make sense to support building using an SDK that doesn't support iOS 7. The minimum supported runtime version is still iOS 5.1.
src/video/uikit/SDL_uikitopenglview.m
src/video/uikit/SDL_uikitviewcontroller.m
src/video/uikit/SDL_uikitwindow.m
--- a/src/video/uikit/SDL_uikitopenglview.m	Wed Jul 23 01:28:24 2014 -0300
+++ b/src/video/uikit/SDL_uikitopenglview.m	Wed Jul 23 01:33:59 2014 -0300
@@ -75,14 +75,11 @@
             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 {
--- a/src/video/uikit/SDL_uikitviewcontroller.m	Wed Jul 23 01:28:24 2014 -0300
+++ b/src/video/uikit/SDL_uikitviewcontroller.m	Wed Jul 23 01:33:59 2014 -0300
@@ -124,13 +124,8 @@
 
 - (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
--- a/src/video/uikit/SDL_uikitwindow.m	Wed Jul 23 01:28:24 2014 -0300
+++ b/src/video/uikit/SDL_uikitwindow.m	Wed Jul 23 01:33:59 2014 -0300
@@ -248,11 +248,10 @@
         [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];