autocommit 2022-03-09 17:51:17 CET
This commit is contained in:
parent
4df6b559b7
commit
0399772467
35 changed files with 429 additions and 423 deletions
17
src/tasks/start_backend.rs
Normal file
17
src/tasks/start_backend.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
use std::future::pending;
|
||||
use std::rc::Rc;
|
||||
use crate::{ErrorFmt, metal, State, XorgBackend};
|
||||
|
||||
pub async fn start_backend(state: Rc<State>) {
|
||||
log::info!("Trying to start X backend");
|
||||
let e = match XorgBackend::new(&state) {
|
||||
Ok(_b) => pending().await,
|
||||
Err(e) => e,
|
||||
};
|
||||
log::warn!("Could not start X backend: {}", ErrorFmt(e));
|
||||
log::info!("Trying to start metal backend");
|
||||
let e = metal::run(state.clone()).await;
|
||||
log::error!("Metal backend failed: {}", ErrorFmt(e));
|
||||
log::warn!("Shutting down");
|
||||
state.el.stop();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue