mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-01 20:43:19 +02:00
Fix bugs that degraded Quick Look quality
This commit is contained in:
@@ -12,8 +12,8 @@ extern OSStatus GBQuickLookRender(CGContextRef cgContext, CFURLRef url, bool sho
|
|||||||
{
|
{
|
||||||
CGSize size = {64, 64};
|
CGSize size = {64, 64};
|
||||||
CGSize maximumSize = request.maximumSize;
|
CGSize maximumSize = request.maximumSize;
|
||||||
while (size.width < maximumSize.width / 2 &&
|
while (size.width <= maximumSize.width / 2 &&
|
||||||
size.width < maximumSize.height / 2) {
|
size.width <= maximumSize.height / 2) {
|
||||||
size.width *= 2;
|
size.width *= 2;
|
||||||
}
|
}
|
||||||
size.height = size.width;
|
size.height = size.width;
|
||||||
|
@@ -83,6 +83,7 @@ OSStatus GBQuickLookRender(CGContextRef cgContext, CFURLRef url, bool showBorder
|
|||||||
effectiveTemplate = template;
|
effectiveTemplate = template;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CGContextSetInterpolationQuality(cgContext, kCGInterpolationMedium);
|
||||||
/* Mask it with the template (The middle part of the template image is transparent) */
|
/* Mask it with the template (The middle part of the template image is transparent) */
|
||||||
[effectiveTemplate drawInRect:(NSRect){{0, 0}, {CGBitmapContextGetWidth(cgContext), CGBitmapContextGetHeight(cgContext)}}];
|
[effectiveTemplate drawInRect:(NSRect){{0, 0}, {CGBitmapContextGetWidth(cgContext), CGBitmapContextGetHeight(cgContext)}}];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user