diff options
Diffstat (limited to 'osdep/macOS_mpv_helper.swift')
-rw-r--r-- | osdep/macOS_mpv_helper.swift | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/osdep/macOS_mpv_helper.swift b/osdep/macOS_mpv_helper.swift index 20407968e2..8ceada6d2e 100644 --- a/osdep/macOS_mpv_helper.swift +++ b/osdep/macOS_mpv_helper.swift @@ -128,7 +128,7 @@ class MPVHelper: NSObject { return flags & UInt64(MPV_RENDER_UPDATE_FRAME.rawValue) > 0 } - func drawRender(_ surface: NSSize, skip: Bool = false) { + func drawRender(_ surface: NSSize, _ ctx: CGLContextObj, skip: Bool = false) { deinitLock.lock() if mpvRenderContext != nil { var i: GLint = 0 @@ -154,6 +154,9 @@ class MPVHelper: NSObject { glClearColor(0, 0, 0, 1) glClear(GLbitfield(GL_COLOR_BUFFER_BIT)) } + + if !skip { CGLFlushDrawable(ctx) } + deinitLock.unlock() } |