From 587dedaa9e95236f891d9a0e4ec04ee3700236a8 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Fri, 7 Aug 2015 16:22:31 +0200 Subject: Correctly handle eglGetDisplay --- src/api/android/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/api/android') diff --git a/src/api/android/mod.rs b/src/api/android/mod.rs index 7c09a7b..1b52cc0 100644 --- a/src/api/android/mod.rs +++ b/src/api/android/mod.rs @@ -112,7 +112,7 @@ impl Window { return Err(OsError(format!("Android's native window is null"))); } - let context = try!(EglContext::new(egl::ffi::egl::Egl, &builder, None) + let context = try!(EglContext::new(egl::ffi::egl::Egl, &builder, egl::NativeDisplay::Android) .and_then(|p| p.finish(native_window as *const _))); let (tx, rx) = channel(); @@ -255,7 +255,7 @@ pub struct HeadlessContext(EglContext); impl HeadlessContext { /// See the docs in the crate root file. pub fn new(builder: BuilderAttribs) -> Result { - let context = try!(EglContext::new(egl::ffi::egl::Egl, &builder, None)); + let context = try!(EglContext::new(egl::ffi::egl::Egl, &builder, egl::NativeDisplay::Android)); let context = try!(context.finish_pbuffer()); Ok(context) } -- cgit v1.2.3