steamvr_drv: Use the correct grip name for XRT_DEVICE_SIMPLE_CONTROLLER

Previously, xrt_device_get_tracked_pose was called with
XRT_INPUT_GENERIC_HEAD_POSE when getting the pose of a SIMPLE_CONTROLLER device.

When using the 'remote' driver, this lead to two warnings per frame [1] and more
importantly the device pose wasn't being read. I haven't tested this with any
other drivers, but it appears that at least the QUERTY driver likely has an
issue with this too, as it uses the input name to determine whether to return
the HMD or controller pose.

[1] ERROR [r_device_get_tracked_pose] Unknown input name
This commit is contained in:
Campbell Suter 2022-04-06 12:35:09 +12:00
parent 16c016c4ca
commit e18ca850ba

View file

@ -581,6 +581,8 @@ public:
grip_name = XRT_INPUT_HYDRA_POSE;
} else if (m_xdev->name == XRT_DEVICE_TOUCH_CONTROLLER) {
grip_name = XRT_INPUT_TOUCH_GRIP_POSE;
} else if (m_xdev->name == XRT_DEVICE_SIMPLE_CONTROLLER) {
grip_name = XRT_INPUT_SIMPLE_GRIP_POSE;
} else {
ovrd_log("Unhandled device name %u\n", m_xdev->name);
grip_name = XRT_INPUT_GENERIC_HEAD_POSE; // ???