anvil: Fix initialization when `bind_wl_display` fails.
If the `egl`-feature is enabled, but `bind_wl_display` fails (e.g. when software rendering via llvmpipe is in use), we should not fail to start.
This commit is contained in:
parent
510c0a5400
commit
4649a34f77
|
@ -441,10 +441,13 @@ impl AnvilState<UdevData> {
|
|||
#[cfg(feature = "egl")]
|
||||
if path.canonicalize().ok() == self.backend_data.primary_gpu {
|
||||
info!(self.log, "Initializing EGL Hardware Acceleration via {:?}", path);
|
||||
renderer
|
||||
if renderer
|
||||
.borrow_mut()
|
||||
.bind_wl_display(&*self.display.borrow())
|
||||
.expect("Unable to bind Wl Display?");
|
||||
.is_ok()
|
||||
{
|
||||
info!(self.log, "EGL hardware-acceleration enabled");
|
||||
}
|
||||
}
|
||||
|
||||
let backends = Rc::new(RefCell::new(scan_connectors(
|
||||
|
|
Loading…
Reference in New Issue