cocoa-cb: fix hwdec when drawing off-screen

drawing off-screen failed because we didn't have a valid context. the
problem is we force off-screen drawing because the CAOpenGLLayer refuses
to draw anything while being off-screen. set the current context before
starting to draw anything off-screen.

Fixes #5530
This commit is contained in:
Akemi 2018-02-17 01:12:05 +01:00 committed by Kevin Mitchell
parent b67d2ede67
commit 4a579ad166
1 changed files with 1 additions and 0 deletions

View File

@ -198,6 +198,7 @@ class VideoLayer: CAOpenGLLayer {
if !cocoaCB.window.occlusionState.contains(.visible) &&
neededFlips > 1 && canDrawOffScreen
{
CGLSetCurrentContext(cglContext!)
draw(cglContext!)
display()
} else {