git.y1.nz

SameBoy

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

commit 6e7ba7589c2be5ce0411185bb7935422ca93945e
parent 66f7babe86983abbf6006f1ba5175956413f9123
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Sun, 26 Dec 2021 18:38:08 +0200

Fixed blurred unfiltered screenshots

Diffstat:
MCocoa/Document.m12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Cocoa/Document.m b/Cocoa/Document.m @@ -2210,6 +2210,12 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) NSImage *ret = nil; if ([[NSUserDefaults standardUserDefaults] boolForKey:@"GBFilterScreenshots"]) { ret = [_view renderToImage]; + [ret lockFocus]; + NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithFocusedViewRect:NSMakeRect(0, 0, + ret.size.width, ret.size.height)]; + [ret unlockFocus]; + ret = [[NSImage alloc] initWithSize:ret.size]; + [ret addRepresentation:bitmapRep]; } if (!ret) { ret = [Document imageFromData:[NSData dataWithBytesNoCopy:_view.currentBuffer @@ -2219,12 +2225,6 @@ static unsigned *multiplication_table_for_frequency(unsigned frequency) height:GB_get_screen_height(&gb) scale:1.0]; } - [ret lockFocus]; - NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithFocusedViewRect:NSMakeRect(0, 0, - ret.size.width, ret.size.height)]; - [ret unlockFocus]; - ret = [[NSImage alloc] initWithSize:ret.size]; - [ret addRepresentation:bitmapRep]; return ret; }

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