mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 13:31:29 +11:00
Add failure if SwapBuffers returns an error
This commit is contained in:
parent
a8c056f83b
commit
32e9b5062c
|
@ -191,7 +191,10 @@ impl Window {
|
|||
/// See the docs if the crate root file.
|
||||
pub fn swap_buffers(&self) {
|
||||
unsafe {
|
||||
ffi::SwapBuffers(self.hdc);
|
||||
if ffi::SwapBuffers(self.hdc) == 0 {
|
||||
use std::os;
|
||||
fail!("{}", os::error_string(os::errno()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue