WayVR: Initial GUI integration

The format of the wayvr.yaml configuration file is subject to change at any time.
This commit is contained in:
Aleksander
2024-10-19 20:39:54 +02:00
committed by galister
parent edfa77e07c
commit d9dddbad11
17 changed files with 453 additions and 89 deletions

View File

@@ -13,6 +13,9 @@ use std::{cell::RefCell, rc::Rc};
#[cfg(feature = "wayvr")]
use crate::backend::wayvr::WayVR;
#[cfg(feature = "wayvr")]
use crate::config_wayvr::{self, WayVRConfig};
use crate::{
backend::{input::InputState, overlay::OverlayID, task::TaskContainer},
config::{AStrMap, GeneralConfig},
@@ -125,6 +128,9 @@ impl AppState {
pub struct AppSession {
pub config: GeneralConfig,
#[cfg(feature = "wayvr")]
pub wayvr_config: WayVRConfig,
pub toast_topics: IdMap<ToastTopic, DisplayMethod>,
}
@@ -143,9 +149,14 @@ impl AppSession {
toast_topics.insert(*k, *v);
});
#[cfg(feature = "wayvr")]
let wayvr_config = config_wayvr::load_wayvr();
AppSession {
config,
toast_topics,
#[cfg(feature = "wayvr")]
wayvr_config,
}
}
}