summaryrefslogtreecommitdiff
path: root/macosx/Pcsxr-QL/GeneratePreviewForURL.m
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-08-06 19:42:16 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2014-08-06 19:42:16 +0000
commitda0bd5088116f8c984880cc6a15c83532f558753 (patch)
treee1c1aa6016b304a0ef2bdd36a980f25ce4d7a75d /macosx/Pcsxr-QL/GeneratePreviewForURL.m
parent2863112f258b1c3618d0b454cff96d81a4dc618d (diff)
downloadpcsxr-da0bd5088116f8c984880cc6a15c83532f558753.tar.gz
OS X: QuickLook: some minor tweaking.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@91193 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/Pcsxr-QL/GeneratePreviewForURL.m')
-rw-r--r--macosx/Pcsxr-QL/GeneratePreviewForURL.m19
1 files changed, 10 insertions, 9 deletions
diff --git a/macosx/Pcsxr-QL/GeneratePreviewForURL.m b/macosx/Pcsxr-QL/GeneratePreviewForURL.m
index ae58b002..e81492f0 100644
--- a/macosx/Pcsxr-QL/GeneratePreviewForURL.m
+++ b/macosx/Pcsxr-QL/GeneratePreviewForURL.m
@@ -104,15 +104,16 @@ static OSStatus GeneratePreviewForMemCard(void *thisInterface, QLPreviewRequestR
for (PcsxrMemoryObject *obj in memCards) {
if (obj.memImageIndex == -1 || obj.memIconCount == 1) {
NSMutableData *pngData = [NSMutableData new];
- CGImageDestinationRef dst = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)pngData, kUTTypePNG, 1, NULL);
- NSImage *theImage = [obj firstMemImage];
- NSRect smallRect = NSMakeRect(0, 0, 16, 16);
-
- CGImageRef imageRef = [theImage CGImageForProposedRect:&smallRect context:nil hints:nil];
- CGImageDestinationAddImage(dst, imageRef, NULL);
-
- CGImageDestinationFinalize(dst);
- CFRelease(dst);
+ {
+ CGImageDestinationRef dst = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)pngData, kUTTypePNG, 1, NULL);
+ NSImage *theImage = [obj firstMemImage];
+
+ CGImageRef imageRef = [theImage CGImageForProposedRect:NULL context:nil hints:nil];
+ CGImageDestinationAddImage(dst, imageRef, NULL);
+
+ CGImageDestinationFinalize(dst);
+ CFRelease(dst);
+ }
NSDictionary *imgProps = @{(NSString *)kQLPreviewPropertyAttachmentDataKey: pngData,
(NSString *)kQLPreviewPropertyMIMETypeKey: @"image/png"};