diff options
author | Felix Kaaman <trundmatu@gmail.com> | 2015-05-23 18:35:47 +0200 |
---|---|---|
committer | Felix Kaaman <trundmatu@gmail.com> | 2015-05-23 18:35:47 +0200 |
commit | e1ab181cdb4a4249b158977d67ff0cbb0368e4a0 (patch) | |
tree | b50c06a58b21d220e067c125a4240dd2caf2f9fb /src/api | |
parent | b72ac990e67771ca8c256859ce3fc472458becd9 (diff) | |
download | glutin-e1ab181cdb4a4249b158977d67ff0cbb0368e4a0.tar.gz glutin-e1ab181cdb4a4249b158977d67ff0cbb0368e4a0.zip |
Fix vsync not being disabled by default in cocoa
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/cocoa/mod.rs | 6 |
1 files changed, 2 insertions, 4 deletions
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 { |