st/oxr: handle device update inputs result

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2246>
This commit is contained in:
Simon Zeni 2024-06-11 16:41:15 -04:00
parent 361cf57360
commit f51f37bb9f
3 changed files with 5 additions and 12 deletions

View file

@ -23,6 +23,7 @@
#include "oxr_input_transform.h"
#include "oxr_subaction.h"
#include "oxr_conversions.h"
#include "oxr_xret.h"
#include <math.h>
#include <stdio.h>
@ -1812,7 +1813,10 @@ oxr_action_sync_data(struct oxr_logger *log,
// Loop over all xdev devices.
for (size_t i = 0; i < sess->sys->xsysd->xdev_count; i++) {
oxr_xdev_update(sess->sys->xsysd->xdevs[i]);
if (sess->sys->xsysd->xdevs[i]) {
xrt_result_t xret = xrt_device_update_inputs(sess->sys->xsysd->xdevs[i]);
OXR_CHECK_XRET(log, sess, xret, oxr_action_sync_data);
}
}
// Reset all action set attachments.

View file

@ -1129,9 +1129,6 @@ oxr_poll_event(struct oxr_logger *log, struct oxr_instance *inst, XrEventDataBuf
void
oxr_xdev_destroy(struct xrt_device **xdev_ptr);
void
oxr_xdev_update(struct xrt_device *xdev);
/*!
* Return true if it finds an input of that name on this device.
*/

View file

@ -85,14 +85,6 @@ oxr_xdev_destroy(struct xrt_device **xdev_ptr)
*xdev_ptr = NULL;
}
void
oxr_xdev_update(struct xrt_device *xdev)
{
if (xdev != NULL) {
xrt_device_update_inputs(xdev);
}
}
bool
oxr_xdev_find_input(struct xrt_device *xdev, enum xrt_input_name name, struct xrt_input **out_input)
{