feat: add default profile with steamvr lighthouse driver

This commit is contained in:
Gabriele Musco 2023-08-13 09:53:48 +00:00
parent 9f3288011e
commit 699566f3d4
3 changed files with 35 additions and 1 deletions

View file

@ -12,7 +12,7 @@ pub static ENV_VAR_DESCRIPTIONS: Map<&str, &str> = phf_map! {
"Colon-separated list of directories where the dynamic linker will search for shared object libraries.",
"XRT_DEBUG_GUI" => "Set to 1 to enable the Monado debug UI",
"XRT_JSON_LOG" => "Set to 1 to enable JSON logging for Monado. This enables better log visualization and log level filtering.",
"LH_DRIVER" => "Lighthouse driver; Valid options are: \"vive\" for the default built-in driver, \"survive\" for Libsurvive, \"steamvr\" for the SteamVR based implementation.",
"LH_DRIVER" => "Lighthouse driver, this overrides the \"Lighthouse driver option in the profile\"; Valid options are: \"vive\" for the default built-in driver, \"survive\" for Libsurvive, \"steamvr\" for the SteamVR based implementation.",
"LH_LOG" => "Lighthouse log level. Can be one of: \"trace\", \"debug\", \"info\", \"warn\", \"error\".",
"LIGHTHOUSE_LOG" => "Lighthouse driver log level. Can be one of: \"trace\", \"debug\", \"info\", \"warn\", \"error\"."
};

View file

@ -0,0 +1,33 @@
use crate::{
constants::APP_NAME,
paths::{data_monado_path, data_opencomposite_path, get_data_dir},
profile::{LighthouseDriver, Profile, ProfileFeatures, XRServiceType},
};
use std::collections::HashMap;
pub fn lighthouse_profile() -> Profile {
let data_dir = get_data_dir();
let prefix = format!("{data}/prefixes/lighthouse_default", data = data_dir);
let mut environment: HashMap<String, String> = HashMap::new();
environment.insert("XRT_JSON_LOG".into(), "1".into());
environment.insert("XRT_COMPOSITOR_SCALE_PERCENTAGE".into(), "140".into());
environment.insert("XRT_COMPOSITOR_COMPUTE".into(), "1".into());
environment.insert(
"LD_LIBRARY_PATH".into(),
format!("{pfx}/lib:{pfx}/lib64", pfx = prefix),
);
Profile {
uuid: "lighthouse-default".into(),
name: format!("Lighthouse Driver - {name} Default", name = APP_NAME),
xrservice_path: data_monado_path(),
xrservice_type: XRServiceType::Monado,
opencomposite_path: data_opencomposite_path(),
features: ProfileFeatures::default(),
environment,
prefix,
can_be_built: true,
editable: false,
lighthouse_driver: LighthouseDriver::SteamVR,
..Default::default()
}
}

View file

@ -1,3 +1,4 @@
pub mod valve_index;
pub mod system_valve_index;
pub mod wivrn;
pub mod lighthouse;