1
0
Fork 0
forked from wry/wry

autocommit 2022-03-09 17:51:17 CET

This commit is contained in:
Julian Orth 2022-03-09 17:51:17 +01:00
parent 4df6b559b7
commit 0399772467
35 changed files with 429 additions and 423 deletions

View 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();
}