metal: emulate vblank events on the nvidia driver
This commit is contained in:
parent
d2b6831ce4
commit
ed65fa07a4
7 changed files with 41 additions and 4 deletions
|
|
@ -30,6 +30,14 @@ impl<T: ?Sized> EventSource<T> {
|
|||
iter: self.listeners.iter(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn has_listeners(&self) -> bool {
|
||||
self.listeners.is_not_empty()
|
||||
}
|
||||
|
||||
pub fn on_attach(&self, f: Box<dyn FnOnce()>) {
|
||||
self.on_attach.set(Some(f));
|
||||
}
|
||||
}
|
||||
|
||||
pub struct EventSourceIter<T: ?Sized> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue