mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 14:21:31 +11:00
Merge pull request #508 from tomaka/wgl-swap-err
Ignore errors generated by SwapBuffers on windows
This commit is contained in:
commit
6f54c286da
|
@ -180,11 +180,14 @@ impl GlContext for Context {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn swap_buffers(&self) -> Result<(), ContextError> {
|
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(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
Err(ContextError::IoError(io::Error::last_os_error()))
|
Err(ContextError::IoError(io::Error::last_os_error()))
|
||||||
}
|
}*/
|
||||||
|
unsafe { gdi32::SwapBuffers(self.hdc) };
|
||||||
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_api(&self) -> Api {
|
fn get_api(&self) -> Api {
|
||||||
|
|
Loading…
Reference in a new issue