From e1ab181cdb4a4249b158977d67ff0cbb0368e4a0 Mon Sep 17 00:00:00 2001 From: Felix Kaaman Date: Sat, 23 May 2015 18:35:47 +0200 Subject: Fix vsync not being disabled by default in cocoa --- src/api/cocoa/mod.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/api') diff --git a/src/api/cocoa/mod.rs b/src/api/cocoa/mod.rs index 55ae617..2725536 100644 --- a/src/api/cocoa/mod.rs +++ b/src/api/cocoa/mod.rs @@ -553,10 +553,8 @@ impl Window { }; cxt.setView_(view); - if builder.vsync { - let value = 1; - cxt.setValues_forParameter_(&value, NSOpenGLContextParameter::NSOpenGLCPSwapInterval); - } + let value = if builder.vsync { 1 } else { 0 }; + cxt.setValues_forParameter_(&value, NSOpenGLContextParameter::NSOpenGLCPSwapInterval); (Some(cxt), Some(pf)) } else { -- cgit v1.2.3