浏览代码

Update speed categories with latest devices, enable 4K playback on iPhone 6 (needs testing)

Felix Paul Kühne 10 年之前
父节点
当前提交
abb948e530
共有 2 个文件被更改,包括 9 次插入2 次删除
  1. 6 2
      Sources/UIDevice+SpeedCategory.m
  2. 3 0
      Sources/VLCMovieViewController.m

+ 6 - 2
Sources/UIDevice+SpeedCategory.m

@@ -34,10 +34,14 @@
         // iPhone 4S, iPad 2 and 3, iPod 4 and 5
         APLog(@"this is a cat two device");
         return 2;
-    } else {
-        // iPhone 5, iPad 4
+    } else if ([currentMachine hasPrefix:@"iPhone5"] || [currentMachine hasPrefix:@"iPhone6"] || [currentMachine hasPrefix:@"iPad4"]) {
+        // iPhone 5 + 5S, iPad 4, iPad Air, iPad mini 2G
         APLog(@"this is a cat three device");
         return 3;
+    } else {
+        // iPhone 6, 2014 iPads
+        APLog(@"this is a cat four device");
+        return 4;
     }
 }
 

+ 3 - 0
Sources/VLCMovieViewController.m

@@ -527,6 +527,9 @@
     } else if (speedCategory == 3) {
         // iPhone 5, iPad 4
         return (totalNumberOfPixels < 2074000); // 1080p
+    } else if (speedCategory == 4) {
+        // iPhone 6, 2014 iPads
+        return (totalNumberOfPixels < 8850000); // 4K
     }
 
     return YES;