Browse Source

Merge branch 'next' of https://github.com/blackberry/GamePlay into next

seanpaultaylor 11 years ago
parent
commit
9d97df650c
1 changed files with 14 additions and 10 deletions
  1. 14 10
      gameplay/src/PlatformiOS.mm

+ 14 - 10
gameplay/src/PlatformiOS.mm

@@ -1511,29 +1511,33 @@ bool Platform::canExit()
 
 
 unsigned int Platform::getDisplayWidth()
 unsigned int Platform::getDisplayWidth()
 {
 {
-    if(NSFoundationVersionNumber <= NSFoundationVersionNumber_iOS_7_1)
+#ifdef NSFoundationVersionNumber_iOS_7_1
+    if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_1)
     {
     {
-        CGSize size = DeviceOrientedSize([__appDelegate.viewController interfaceOrientation]);
-        return size.width;
+        //iOS 8+
+        return [[UIScreen mainScreen] bounds].size.width * [[UIScreen mainScreen] scale];
     }
     }
     else
     else
+#endif
     {
     {
-        //iOS 8+
-        return [[UIScreen mainScreen] bounds].size.width * [[UIScreen mainScreen] scale];
+        CGSize size = DeviceOrientedSize([__appDelegate.viewController interfaceOrientation]);
+        return size.width;
     }
     }
 }
 }
 
 
 unsigned int Platform::getDisplayHeight()
 unsigned int Platform::getDisplayHeight()
 {
 {
-    if(NSFoundationVersionNumber <= NSFoundationVersionNumber_iOS_7_1)
+#ifdef NSFoundationVersionNumber_iOS_7_1
+    if (NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_1)
     {
     {
-        CGSize size = DeviceOrientedSize([__appDelegate.viewController interfaceOrientation]);
-        return size.height;
+        //iOS 8+
+        return [[UIScreen mainScreen] bounds].size.height * [[UIScreen mainScreen] scale];
     }
     }
     else
     else
+#endif
     {
     {
-        //iOS 8+
-        return [[UIScreen mainScreen] bounds].size.height * [[UIScreen mainScreen] scale];
+        CGSize size = DeviceOrientedSize([__appDelegate.viewController interfaceOrientation]);
+        return size.height;
     }
     }
 }
 }