diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index d6d93ce4894..90f41f8ee5f 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -187,8 +187,15 @@ @implementation OpenGLCocoaView - (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