Skip to content

Commit 6d6aafe

Browse files
committed
Fix scrolling view in newer macOS versions
1 parent 003e891 commit 6d6aafe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Cocoa/GBImageView.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ - (void)drawRect:(NSRect)dirtyRect
4444
}
4545

4646
if (parent.displayScrollRect) {
47-
NSBezierPath *path = [NSBezierPath bezierPathWithRect:CGRectInfinite];
47+
// CGRectInfinite in NSBezierPath is broken in newer macOS versions
48+
NSBezierPath *path = [NSBezierPath bezierPathWithRect:CGRectMake(-0x4000, -0x4000, 0x8000, 0x8000)];
4849
for (unsigned x = 0; x < 2; x++) {
4950
for (unsigned y = 0; y < 2; y++) {
5051
NSRect rect = parent.scrollRect;

0 commit comments

Comments
 (0)