diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/out/cocoa_common.m | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index 1c5c3a5e25..6987d5ca5d 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -438,16 +438,16 @@ void vo_cocoa_set_current_context(struct vo *vo, bool current) { struct vo_cocoa_state *s = vo->cocoa; - if (s->inside_sync_section) { - return; - } - if (current) { - [s->lock lock]; + if (!s->inside_sync_section) + [s->lock lock]; + [s->gl_ctx makeCurrentContext]; } else { [NSOpenGLContext clearCurrentContext]; - [s->lock unlock]; + + if (!s->inside_sync_section) + [s->lock unlock]; } } |