mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 06:41:31 +11:00
implement Window is_current() for cocoa backend
This commit is contained in:
parent
70776fab41
commit
9cecb7ee55
|
@ -617,7 +617,15 @@ impl Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_current(&self) -> bool {
|
pub fn is_current(&self) -> bool {
|
||||||
unimplemented!()
|
unsafe {
|
||||||
|
let current = NSOpenGLContext::currentContext(nil);
|
||||||
|
if current != nil {
|
||||||
|
let is_equal: bool = msg_send()(current, selector("isEqual:"), *self.context);
|
||||||
|
is_equal
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_proc_address(&self, _addr: &str) -> *const () {
|
pub fn get_proc_address(&self, _addr: &str) -> *const () {
|
||||||
|
|
Loading…
Reference in a new issue