diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index d6d93ce489..90f41f8ee5 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -187,8 +187,15 @@ namespace - (void)drawRect:(NSRect)dirtyRect { - [NSColor.blackColor setFill]; - NSRectFill(dirtyRect); + if ([NSGraphicsContext currentContext]) + { + [NSColor.blackColor setFill]; + NSRectFill(dirtyRect); + } + else if (self.layer != nil) + { + self.layer.backgroundColor = CGColorGetConstantColor(kCGColorBlack); + } } - (void)resetCursorRects