mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-12 23:54:37 +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
55cfecbe2c
commit
0c2faae48b
1 changed files with 9 additions and 2 deletions
|
@ -185,10 +185,17 @@ namespace
|
||||||
@implementation OpenGLCocoaView
|
@implementation OpenGLCocoaView
|
||||||
|
|
||||||
- (void)drawRect:(NSRect)dirtyRect
|
- (void)drawRect:(NSRect)dirtyRect
|
||||||
|
{
|
||||||
|
if ([NSGraphicsContext currentContext])
|
||||||
{
|
{
|
||||||
[NSColor.blackColor setFill];
|
[NSColor.blackColor setFill];
|
||||||
NSRectFill(dirtyRect);
|
NSRectFill(dirtyRect);
|
||||||
}
|
}
|
||||||
|
else if (self.layer != nil)
|
||||||
|
{
|
||||||
|
self.layer.backgroundColor = CGColorGetConstantColor(kCGColorBlack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)resetCursorRects
|
- (void)resetCursorRects
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue