The open source OpenXR runtime
0
fork

Configure Feed

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

d/android: Set both orientation and position valid/tracked flags

hello_xr, unity and possibly other apps check the view pose flags
for both pos & orientation flags to be valid otherwise they invoke
`xrEndFrame` with no layers set.

+8 -3
+8 -3
src/xrt/drivers/android/android_sensors.c
··· 178 178 (void)at_timestamp_ns; 179 179 180 180 struct android_device *d = android_device(xdev); 181 - out_relation->pose.orientation = d->fusion.rot; 181 + 182 + struct xrt_space_relation new_relation = XRT_SPACE_RELATION_ZERO; 183 + new_relation.pose.orientation = d->fusion.rot; 182 184 183 185 //! @todo assuming that orientation is actually currently tracked. 184 - out_relation->relation_flags = (enum xrt_space_relation_flags)(XRT_SPACE_RELATION_ORIENTATION_VALID_BIT | 185 - XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT); 186 + new_relation.relation_flags = (enum xrt_space_relation_flags)(XRT_SPACE_RELATION_ORIENTATION_VALID_BIT | 187 + XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT | 188 + XRT_SPACE_RELATION_POSITION_VALID_BIT); 189 + 190 + *out_relation = new_relation; 186 191 } 187 192 188 193