aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Kaaman <trundmatu@gmail.com>2015-05-23 18:35:47 +0200
committerFelix Kaaman <trundmatu@gmail.com>2015-05-23 18:35:47 +0200
commite1ab181cdb4a4249b158977d67ff0cbb0368e4a0 (patch)
treeb50c06a58b21d220e067c125a4240dd2caf2f9fb
parentb72ac990e67771ca8c256859ce3fc472458becd9 (diff)
downloadglutin-e1ab181cdb4a4249b158977d67ff0cbb0368e4a0.tar.gz
glutin-e1ab181cdb4a4249b158977d67ff0cbb0368e4a0.zip
Fix vsync not being disabled by default in cocoa
-rw-r--r--src/api/cocoa/mod.rs6
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 {