mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- fixed invalid context warnings with Cocoa backend
A bunch of 'CGContext<...>: invalid context 0x0' messages were printed to console during OpenGL view creation and resizing
This commit is contained in:
parent
7e050010aa
commit
442f953d67
1 changed files with 9 additions and 2 deletions
|
@ -187,8 +187,15 @@ namespace
|
||||||
|
|
||||||
- (void)drawRect:(NSRect)dirtyRect
|
- (void)drawRect:(NSRect)dirtyRect
|
||||||
{
|
{
|
||||||
[NSColor.blackColor setFill];
|
if ([NSGraphicsContext currentContext])
|
||||||
NSRectFill(dirtyRect);
|
{
|
||||||
|
[NSColor.blackColor setFill];
|
||||||
|
NSRectFill(dirtyRect);
|
||||||
|
}
|
||||||
|
else if (self.layer != nil)
|
||||||
|
{
|
||||||
|
self.layer.backgroundColor = CGColorGetConstantColor(kCGColorBlack);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)resetCursorRects
|
- (void)resetCursorRects
|
||||||
|
|
Loading…
Reference in a new issue