Skip to content

Commit

Permalink
fix #1229 (#1244)
Browse files Browse the repository at this point in the history
  • Loading branch information
HackedOS authored Dec 3, 2023
1 parent 859ed44 commit 3daae15
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion anvil/src/udev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ impl DmabufHandler for AnvilState<UdevData> {
.gpus
.single_renderer(&self.backend_data.primary_gpu)
.and_then(|mut renderer| renderer.import_dmabuf(&dmabuf, None))
.is_err()
.is_ok()
{
let _ = notifier.successful::<AnvilState<UdevData>>();
} else {
notifier.failed();
}
}
Expand Down
4 changes: 3 additions & 1 deletion anvil/src/winit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ impl DmabufHandler for AnvilState<WinitData> {
.backend
.renderer()
.import_dmabuf(&dmabuf, None)
.is_err()
.is_ok()
{
let _ = notifier.successful::<AnvilState<WinitData>>();
} else {
notifier.failed();
}
}
Expand Down
4 changes: 3 additions & 1 deletion anvil/src/x11.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ impl DmabufHandler for AnvilState<X11Data> {
}

fn dmabuf_imported(&mut self, _global: &DmabufGlobal, dmabuf: Dmabuf, notifier: ImportNotifier) {
if self.backend_data.renderer.import_dmabuf(&dmabuf, None).is_err() {
if self.backend_data.renderer.import_dmabuf(&dmabuf, None).is_ok() {
let _ = notifier.successful::<AnvilState<X11Data>>();
} else {
notifier.failed();
}
}
Expand Down

0 comments on commit 3daae15

Please sign in to comment.