瀏覽代碼

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

seanpaultaylor 11 年之前
父節點
當前提交
9d97df650c
共有 1 個文件被更改,包括 14 次插入10 次删除
  1. 14 10
      gameplay/src/PlatformiOS.mm

+ 14 - 10
gameplay/src/PlatformiOS.mm

@@ -1511,29 +1511,33 @@ bool Platform::canExit()
 
 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
+#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()
 {
-    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
+#endif
     {
-        //iOS 8+
-        return [[UIScreen mainScreen] bounds].size.height * [[UIScreen mainScreen] scale];
+        CGSize size = DeviceOrientedSize([__appDelegate.viewController interfaceOrientation]);
+        return size.height;
     }
 }