Skip to content

Commit

Permalink
OS X: QuickLook: Have the thumbnail images for the memory cards chang…
Browse files Browse the repository at this point in the history
…ed to 32 pixels.

Minor coding style changes.

git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@91797 e17a0e51-4ae3-4d35-97c3-1a29b211df97
  • Loading branch information
SND\MaddTheSane_cp authored and SND\MaddTheSane_cp committed Oct 7, 2014
1 parent c73ee1b commit 0abe31f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions macosx/Pcsxr-QL/GeneratePreviewForURL.m
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ static OSStatus GeneratePreviewForMemCard(void *thisInterface, QLPreviewRequestR

for (PcsxrMemoryObject *obj in memCards) {
if (!obj.hasImages || obj.memIconCount == 1) {
NSMutableData *pngData = [NSMutableData new];
NSMutableData *pngData = [[NSMutableData alloc] init];
{
CGImageDestinationRef dst = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)pngData, kUTTypePNG, 1, NULL);
NSImage *theImage = [obj firstMemImage];
Expand All @@ -122,12 +122,12 @@ static OSStatus GeneratePreviewForMemCard(void *thisInterface, QLPreviewRequestR
htmlDict[imgName] = imgProps;
continue;
}
NSMutableData *gifData = [NSMutableData new];
NSMutableData *gifData = [[NSMutableData alloc] init];

CGImageDestinationRef dst = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)gifData, kUTTypeGIF, obj.memIconCount, NULL);
for (NSImage *theImage in obj.memoryCardImages) {
CGImageRef imageRef = [theImage CGImageForProposedRect:NULL context:nil hints:nil];
CGImageDestinationAddImage(dst, imageRef,(__bridge CFDictionaryRef)(gifPrep));
CGImageDestinationAddImage(dst, imageRef, (__bridge CFDictionaryRef)(gifPrep));
}
CGImageDestinationFinalize(dst);
CFRelease(dst);
Expand Down
2 changes: 1 addition & 1 deletion macosx/Pcsxr-QL/GenerateThumbnailForURL.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
This function's job is to create thumbnail for designated file as fast as possible
----------------------------------------------------------------------------- */

#define ImageDivider 16
#define ImageDivider 32

static OSStatus GenerateThumbnailForFreeze(void *thisInterface, QLThumbnailRequestRef preview, NSURL *url, NSDictionary *options, CGSize maxSize);
static OSStatus GenerateThumbnailForMemCard(void *thisInterface, QLThumbnailRequestRef preview, NSURL *url, NSDictionary *options, CGSize maxSize);
Expand Down

0 comments on commit 0abe31f

Please sign in to comment.