From 23f6f177fe9490600c188c04895cb00c84f7ed92 Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sat, 27 Jun 2015 16:16:54 +0200 Subject: Ignore errors generated by SwapBuffers on windows --- src/api/wgl/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/api/wgl/mod.rs b/src/api/wgl/mod.rs index a71bb34..cf09ad0 100644 --- a/src/api/wgl/mod.rs +++ b/src/api/wgl/mod.rs @@ -180,11 +180,14 @@ impl GlContext for Context { } fn swap_buffers(&self) -> Result<(), ContextError> { - if unsafe { gdi32::SwapBuffers(self.hdc) } != 0 { + // TODO: decide how to handle the error + /*if unsafe { gdi32::SwapBuffers(self.hdc) } != 0 { Ok(()) } else { Err(ContextError::IoError(io::Error::last_os_error())) - } + }*/ + unsafe { gdi32::SwapBuffers(self.hdc) }; + Ok(()) } fn get_api(&self) -> Api { -- cgit v1.2.3