project_files/HedgewarsMobile/Classes/MapConfigViewController.m
changeset 4505 4a8f87eb67cb
parent 4476 4bf74e158f44
child 4976 088d40d8aba2
--- a/project_files/HedgewarsMobile/Classes/MapConfigViewController.m	Sat Dec 11 01:55:16 2010 +0100
+++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.m	Sat Dec 11 02:30:03 2010 +0100
@@ -386,14 +386,15 @@
     [string release];
     // remove a trailing "" element
     [themeArray removeLastObject];
+
+    // remove images that are too big for certain devices without loading the whole image
     NSArray *mapArrayFull = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MAPS_DIRECTORY() error:NULL];
     NSMutableArray *mapArray = [[NSMutableArray alloc] init];
     for (NSString *str in mapArrayFull) {
         CGSize imgSize = PSPNGSizeFromMetaData([MAPS_DIRECTORY() stringByAppendingFormat:@"%@/map.png",str]);
-        // remove images that are too big for certain devices
         if (IS_NOT_POWERFUL() && imgSize.height > 1024.0f)
             continue;
-        if ([modelType() hasPrefix:@"iPad1"] && imgSize.height > 1280.0f)
+        if (IS_NOT_VERY_POWERFUL() && imgSize.height > 1280.0f)
             continue;
         [mapArray addObject:str];
     }
@@ -402,10 +403,9 @@
     NSMutableArray *missionArray = [[NSMutableArray alloc] init];
     for (NSString *str in missionArrayFull) {
         CGSize imgSize = PSPNGSizeFromMetaData([MISSIONS_DIRECTORY() stringByAppendingFormat:@"%@/map.png",str]);
-        // remove images that are too big for certain devices
         if (IS_NOT_POWERFUL() && imgSize.height > 1024.0f)
             continue;
-        if ([modelType() hasPrefix:@"iPad1"] && imgSize.height > 1280.0f)
+        if (IS_NOT_VERY_POWERFUL() && imgSize.height > 1280.0f)
             continue;
         [missionArray addObject:str];
     }