mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 04:40:04 -04:00
Win32: no longer fails when calling swap_buffers on a closed window
This commit is contained in:
@@ -192,11 +192,7 @@ impl Window {
|
|||||||
pub fn swap_buffers(&self) {
|
pub fn swap_buffers(&self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
ffi::glFlush();
|
ffi::glFlush();
|
||||||
|
ffi::SwapBuffers(self.hdc);
|
||||||
if ffi::SwapBuffers(self.hdc) == 0 {
|
|
||||||
use std::os;
|
|
||||||
fail!("{}", os::error_string(os::errno()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user