WayVR: Use wayvr-dashboard as the default executable if it's not set
This commit is contained in:
@@ -117,7 +117,7 @@ fn def_blit_method() -> String {
|
|||||||
String::from("dmabuf")
|
String::from("dmabuf")
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Serialize)]
|
#[derive(Clone, Deserialize, Serialize)]
|
||||||
pub struct WayVRDashboard {
|
pub struct WayVRDashboard {
|
||||||
pub exec: String,
|
pub exec: String,
|
||||||
pub args: Option<String>,
|
pub args: Option<String>,
|
||||||
|
|||||||
@@ -270,11 +270,14 @@ fn toggle_dashboard<O>(
|
|||||||
where
|
where
|
||||||
O: Default,
|
O: Default,
|
||||||
{
|
{
|
||||||
let conf_dash = &app.session.wayvr_config.dashboard;
|
let conf_dash = app.session.wayvr_config.dashboard.clone().map_or_else(
|
||||||
|
|| config_wayvr::WayVRDashboard {
|
||||||
let Some(conf_dash) = &conf_dash else {
|
exec: String::from("wayvr-dashboard"),
|
||||||
anyhow::bail!("Dashboard is not configured");
|
args: None,
|
||||||
};
|
env: None,
|
||||||
|
},
|
||||||
|
|conf| conf,
|
||||||
|
);
|
||||||
|
|
||||||
if !wayvr.dashboard_executed && !executable_exists_in_path(&conf_dash.exec) {
|
if !wayvr.dashboard_executed && !executable_exists_in_path(&conf_dash.exec) {
|
||||||
anyhow::bail!("Executable \"{}\" not found", &conf_dash.exec);
|
anyhow::bail!("Executable \"{}\" not found", &conf_dash.exec);
|
||||||
|
|||||||
Reference in New Issue
Block a user