mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-11 13:31:29 +11:00
Fix GL context not being destroyed on win32
This commit is contained in:
parent
3c9565ad25
commit
d574f6f1bb
|
@ -199,6 +199,9 @@ impl Window {
|
|||
#[unsafe_destructor]
|
||||
impl Drop for Window {
|
||||
fn drop(&mut self) {
|
||||
use std::ptr;
|
||||
unsafe { ffi::wglMakeCurrent(ptr::mut_null(), ptr::mut_null()); }
|
||||
unsafe { ffi::wglDeleteContext(self.context); }
|
||||
unsafe { ffi::DestroyWindow(self.window); }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue