The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

d/remote: Mark pose as invalid when deactivated

Previously the pose on the remote driver controllers would always have
the set pose and the valid-tracking flags set. Leaving the pose set
makes sense (you might want to track how your game behaves when a
controller looses tracking but still has a pose set, for example
tracking issues caused by occlusion) but it wasn't possible to test with
the pose marked as not being tracked.

Therefore this patch deactivates the tracking flags when the controller
is not marked as active.

+9 -4
+9 -4
src/xrt/drivers/remote/r_device.c
··· 104 104 105 105 out_relation->pose = latest->pose; 106 106 out_relation->linear_velocity = latest->linear_velocity; 107 - out_relation->relation_flags = (enum xrt_space_relation_flags)( 108 - XRT_SPACE_RELATION_ORIENTATION_VALID_BIT | XRT_SPACE_RELATION_POSITION_VALID_BIT | 109 - XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT | XRT_SPACE_RELATION_POSITION_TRACKED_BIT | 110 - XRT_SPACE_RELATION_LINEAR_VELOCITY_VALID_BIT | XRT_SPACE_RELATION_ANGULAR_VELOCITY_VALID_BIT); 107 + 108 + if (latest->active) { 109 + out_relation->relation_flags = (enum xrt_space_relation_flags)( 110 + XRT_SPACE_RELATION_ORIENTATION_VALID_BIT | XRT_SPACE_RELATION_POSITION_VALID_BIT | 111 + XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT | XRT_SPACE_RELATION_POSITION_TRACKED_BIT | 112 + XRT_SPACE_RELATION_LINEAR_VELOCITY_VALID_BIT | XRT_SPACE_RELATION_ANGULAR_VELOCITY_VALID_BIT); 113 + } else { 114 + out_relation->relation_flags = 0; 115 + } 111 116 } 112 117 113 118 static void