From 3f9d94cb8a08de02dd3dd8d5bc13ca15ece49eb3 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Wed, 25 Dec 2019 14:21:45 +0000 Subject: [PATCH] d/psmv: Mark ball pose as active depending on tracking --- src/xrt/drivers/psmv/psmv_driver.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xrt/drivers/psmv/psmv_driver.c b/src/xrt/drivers/psmv/psmv_driver.c index 37dbe0f22..03d0f0438 100644 --- a/src/xrt/drivers/psmv/psmv_driver.c +++ b/src/xrt/drivers/psmv/psmv_driver.c @@ -877,6 +877,9 @@ psmv_device_update_inputs(struct xrt_device *xdev, psmv_update_input_click(psmv, PSMV_INDEX_CIRCLE_CLICK, now, PSMV_BUTTON_BIT_CIRCLE); psmv_update_input_click(psmv, PSMV_INDEX_TRIANGLE_CLICK, now, PSMV_BUTTON_BIT_TRIANGLE); psmv_update_trigger_value(psmv, PSMV_INDEX_TRIGGER_VALUE, now); + + // Only report the ball as active if we can track it. + psmv->base.inputs[PSMV_INDEX_BALL_CENTER_POSE].active = psmv->ball != NULL; // clang-format on // Done now.