diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-06-27 18:21:41 +0200 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-06-27 18:21:41 +0200 |
commit | 6f54c286da1edeb1a629c979d3eb239d0cde3cf3 (patch) | |
tree | 6f76bff51280fee1e53ee734689cdf6b4fb669e5 | |
parent | 3166f92a53b4ca13f3794de7eae44ae61bb9fafb (diff) | |
parent | 23f6f177fe9490600c188c04895cb00c84f7ed92 (diff) | |
download | glutin-6f54c286da1edeb1a629c979d3eb239d0cde3cf3.tar.gz glutin-6f54c286da1edeb1a629c979d3eb239d0cde3cf3.zip |
Merge pull request #508 from tomaka/wgl-swap-err
Ignore errors generated by SwapBuffers on windows
-rw-r--r-- | src/api/wgl/mod.rs | 7 |
1 files changed, 5 insertions, 2 deletions
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 { |