1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
use crate::Path;
pub struct ViveTrackerPathsHTCX {
pub persistent: Path,
pub role: Option<Path>,
}
impl From<sys::ViveTrackerPathsHTCX> for ViveTrackerPathsHTCX {
fn from(paths: sys::ViveTrackerPathsHTCX) -> Self {
Self {
persistent: paths.persistent_path,
role: if paths.role_path.into_raw() == sys::NULL_PATH as u64 {
None
} else {
Some(paths.role_path)
},
}
}
}