git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit 1d5cb77464b4b7d2a40b897526e07211a9ec4ab7
parent b5761c29d54c8f39d38c0dacf51ccecd1f6519bf
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Sat,  7 Dec 2024 20:02:00 +0200

Fix bugs that degraded Quick Look quality

Diffstat:
MQuickLook/GBThumbnailProvider.m4++--
MQuickLook/generator.m1+
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/QuickLook/GBThumbnailProvider.m b/QuickLook/GBThumbnailProvider.m @@ -12,8 +12,8 @@ extern OSStatus GBQuickLookRender(CGContextRef cgContext, CFURLRef url, bool sho { CGSize size = {64, 64}; CGSize maximumSize = request.maximumSize; - while (size.width < maximumSize.width / 2 && - size.width < maximumSize.height / 2) { + while (size.width <= maximumSize.width / 2 && + size.width <= maximumSize.height / 2) { size.width *= 2; } size.height = size.width; diff --git a/QuickLook/generator.m b/QuickLook/generator.m @@ -83,6 +83,7 @@ OSStatus GBQuickLookRender(CGContextRef cgContext, CFURLRef url, bool showBorder effectiveTemplate = template; } + CGContextSetInterpolationQuality(cgContext, kCGInterpolationMedium); /* Mask it with the template (The middle part of the template image is transparent) */ [effectiveTemplate drawInRect:(NSRect){{0, 0}, {CGBitmapContextGetWidth(cgContext), CGBitmapContextGetHeight(cgContext)}}]; }

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.