diff --git a/Mini vMac/Assets.xcassets/floppy.imageset/floppy.png b/Mini vMac/Assets.xcassets/floppy.imageset/floppy.png index 88aea86..2d052d7 100644 Binary files a/Mini vMac/Assets.xcassets/floppy.imageset/floppy.png and b/Mini vMac/Assets.xcassets/floppy.imageset/floppy.png differ diff --git a/Mini vMac/Assets.xcassets/floppy.imageset/floppy@2x.png b/Mini vMac/Assets.xcassets/floppy.imageset/floppy@2x.png index 9e9ca0b..6af1d0b 100644 Binary files a/Mini vMac/Assets.xcassets/floppy.imageset/floppy@2x.png and b/Mini vMac/Assets.xcassets/floppy.imageset/floppy@2x.png differ diff --git a/Mini vMac/Assets.xcassets/floppy.imageset/floppy@3x.png b/Mini vMac/Assets.xcassets/floppy.imageset/floppy@3x.png index fef6174..1738ad1 100644 Binary files a/Mini vMac/Assets.xcassets/floppy.imageset/floppy@3x.png and b/Mini vMac/Assets.xcassets/floppy.imageset/floppy@3x.png differ diff --git a/Mini vMac/Assets.xcassets/floppyV.imageset/Contents.json b/Mini vMac/Assets.xcassets/floppyV.imageset/Contents.json new file mode 100644 index 0000000..6aa05a2 --- /dev/null +++ b/Mini vMac/Assets.xcassets/floppyV.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "floppyV.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "floppyV@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "floppyV@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Mini vMac/Assets.xcassets/floppyV.imageset/floppyV.png b/Mini vMac/Assets.xcassets/floppyV.imageset/floppyV.png new file mode 100644 index 0000000..c930d16 Binary files /dev/null and b/Mini vMac/Assets.xcassets/floppyV.imageset/floppyV.png differ diff --git a/Mini vMac/Assets.xcassets/floppyV.imageset/floppyV@2x.png b/Mini vMac/Assets.xcassets/floppyV.imageset/floppyV@2x.png new file mode 100644 index 0000000..29b4c9c Binary files /dev/null and b/Mini vMac/Assets.xcassets/floppyV.imageset/floppyV@2x.png differ diff --git a/Mini vMac/Assets.xcassets/floppyV.imageset/floppyV@3x.png b/Mini vMac/Assets.xcassets/floppyV.imageset/floppyV@3x.png new file mode 100644 index 0000000..2b49352 Binary files /dev/null and b/Mini vMac/Assets.xcassets/floppyV.imageset/floppyV@3x.png differ diff --git a/Mini vMac/InsertDiskViewController.m b/Mini vMac/InsertDiskViewController.m index b61d973..d609d3b 100644 --- a/Mini vMac/InsertDiskViewController.m +++ b/Mini vMac/InsertDiskViewController.m @@ -523,13 +523,15 @@ _filePath = filePath; NSString *fileName = filePath.lastPathComponent; self.textLabel.text = self.showExtension ? fileName : fileName.stringByDeletingPathExtension; - NSDictionary *attributes = [[NSURL fileURLWithPath:filePath] resourceValuesForKeys:@[NSURLTotalFileSizeKey] error:NULL]; + NSDictionary *attributes = [[NSURL fileURLWithPath:filePath] resourceValuesForKeys:@[NSURLTotalFileSizeKey, NSURLFileSizeKey] error:NULL]; if (attributes && attributes[NSURLTotalFileSizeKey]) { BOOL isDiskImage = [[AppDelegate sharedInstance].diskImageExtensions containsObject:fileName.pathExtension.lowercaseString]; if (isDiskImage) { UIImage *icon = [UIImage imageWithIconForDiskImage:filePath]; if (icon == nil) { - icon = [UIImage imageNamed:@"floppy"]; + NSInteger fileSize = [attributes[NSURLTotalFileSizeKey] integerValue]; + NSInteger numBlocks = fileSize / 512; + icon = [UIImage imageNamed:numBlocks == 800 || numBlocks == 1600 ? @"floppy" : @"floppyV"]; } self.imageView.image = icon; } else {