aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-05-23 19:25:56 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-05-23 19:25:56 +0200
commit1377f276b7b64a1e75aa43da7efdea9a81155397 (patch)
treefacf7a6dee59196fa023404de463f31ee2efca3d /src
parentc2acd0360ccec809725810b70bb48c1dea461807 (diff)
parente1ab181cdb4a4249b158977d67ff0cbb0368e4a0 (diff)
downloadglutin-1377f276b7b64a1e75aa43da7efdea9a81155397.tar.gz
glutin-1377f276b7b64a1e75aa43da7efdea9a81155397.zip
Merge pull request #469 from fkaa/cocoa-vsync
Fix vsync not being disabled by default in cocoa
Diffstat (limited to 'src')
-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 {