From 4494e927f72618acdfe2cf21fef54669ff5f3520 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Fri, 6 Oct 2017 06:35:07 -0700 Subject: [PATCH] libobs-opengl: Disable v-sync on mac Sets the swap interval to 0 to prevent v-sync from affecting any of the preview panes on mac. --- libobs-opengl/gl-cocoa.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libobs-opengl/gl-cocoa.m b/libobs-opengl/gl-cocoa.m index e4f83fff7..0bcbca2ce 100644 --- a/libobs-opengl/gl-cocoa.m +++ b/libobs-opengl/gl-cocoa.m @@ -73,12 +73,14 @@ static NSOpenGLContext *gl_context_create(void) struct gl_platform *gl_platform_create(gs_device_t *device, uint32_t adapter) { struct gl_platform *plat = bzalloc(sizeof(struct gl_platform)); + GLint interval = 0; plat->context = gl_context_create(); if (!plat->context) goto fail; [plat->context makeCurrentContext]; + [plat->context setValues:&interval forParameter:NSOpenGLCPSwapInterval]; if (!gladLoadGL()) goto fail;