aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-05-02 08:28:48 +0200
committertomaka <pierre.krieger1708@gmail.com>2015-05-02 08:28:48 +0200
commit1e714a5b23803dfa53e9c4d0357fd3871c6b8108 (patch)
tree4e22b4b78b48b7b86841810a5cf9d37a5cb3773b
parentef453188479688339b52c28fae563dc09905c077 (diff)
parent81d0dc97e14de4c28f3228bf29d98ceaad69f1d2 (diff)
downloadglutin-1e714a5b23803dfa53e9c4d0357fd3871c6b8108.tar.gz
glutin-1e714a5b23803dfa53e9c4d0357fd3871c6b8108.zip
Merge pull request #422 from Ryman/fixosx
Fix further compilation of cocoa
-rw-r--r--src/api/cocoa/mod.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/api/cocoa/mod.rs b/src/api/cocoa/mod.rs
index 5b42abc..645b995 100644
--- a/src/api/cocoa/mod.rs
+++ b/src/api/cocoa/mod.rs
@@ -343,8 +343,8 @@ impl Window {
// TODO: perhaps we should return error from create_context so we can
// determine the cause of failure and possibly recover?
let (context, pf) = match Window::create_context(*view, &builder) {
- (Some(context), Some(pf)) => (context, pf),
- (_, _) => { return Err(OsError(format!("Couldn't create OpenGL context"))); },
+ Ok((Some(context), Some(pf))) => (context, pf),
+ _ => { return Err(OsError(format!("Couldn't create OpenGL context"))); },
};
unsafe {
@@ -473,12 +473,12 @@ impl Window {
let profile = match (builder.gl_version, builder.gl_version.to_gl_version(), builder.gl_profile) {
(GlRequest::Latest, _, Some(GlProfile::Compatibility)) => NSOpenGLProfileVersionLegacy as u32,
(GlRequest::Latest, _, _) => NSOpenGLProfileVersion4_1Core as u32,
- (_, Some(1 ... 2, _), Some(GlProfile::Core)) |
- (_, Some(3 ... 4, _), Some(GlProfile::Compatibility)) =>
+ (_, Some((1 ... 2, _)), Some(GlProfile::Core)) |
+ (_, Some((3 ... 4, _)), Some(GlProfile::Compatibility)) =>
return Err(CreationError::NotSupported),
- (_, Some(1 ... 2, _), _) => NSOpenGLProfileVersionLegacy as u32,
- (_, Some(3, 0 ... 2), _) => NSOpenGLProfileVersion3_2Core as u32,
- (_, Some(3 ... 4, _), _) => NSOpenGLProfileVersion4_1Core as u32,
+ (_, Some((1 ... 2, _)), _) => NSOpenGLProfileVersionLegacy as u32,
+ (_, Some((3, 0 ... 2)), _) => NSOpenGLProfileVersion3_2Core as u32,
+ (_, Some((3 ... 4, _)), _) => NSOpenGLProfileVersion4_1Core as u32,
_ => return Err(CreationError::NotSupported),
};