input: use XR_EXT_hand_tracking_data_source for skeletal tracking level#338
input: use XR_EXT_hand_tracking_data_source for skeletal tracking level#338ImSapphire wants to merge 2 commits into
Conversation
f2827d0 to
371a497
Compare
|
This fixes the hack checking of index knuckles profile for determining if handtrack should be full or partial. Allows for Mercury handtrack with synthetic valve index hand poses if enabled in the steamvr_lh driver while monado handles reporting which one is active. |
| hand_tracker: Option<xr::HandTracker>, | ||
| skeleton_cache: Mutex<HashMap<u64, Option<xr::HandJointLocations>>>, | ||
| skeleton_cache: | ||
| Mutex<HashMap<u64, Option<(xr::HandJointLocations, xr::HandTrackingDataSourceEXT)>>>, |
There was a problem hiding this comment.
This is a busy type name. I think it'd be worth the clarity to create a dedicated struct instead of the tuple.
| time: xr::Time, | ||
| ) -> xr::Result<Option<(xr::HandJointLocations, xr::HandTrackingDataSourceEXT)>> { | ||
| let ext = base.instance().exts().ext_hand_tracking.unwrap(); | ||
| unsafe { |
There was a problem hiding this comment.
I'd prefer if the actual unsafe portions were the only parts marked with unsafe (within reason)
| let r = | ||
| (ext.locate_hand_joints)(tracker.as_raw(), &locate_info, &mut location_info); |
There was a problem hiding this comment.
I assume this is using the raw version directly because of the source state addon. That could use a comment considering there is a safe version of locate_hand_joints.
| .unwrap_or_default(); | ||
| skeleton_cache.insert(base.as_raw().into_raw(), joints); | ||
| joints | ||
| fn get_joints_with_data_source( |
There was a problem hiding this comment.
This doesn't really need to be a nested function imo, makes it a bit hard to read.
No description provided.