mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-28 17:38:27 +00:00
d/vive_controller: read from usb with timeout
This aligns with the vive HMD driver and fixes high CPU usage.
This commit is contained in:
parent
dc4dcf15a9
commit
aaa2f0a0bd
|
@ -867,7 +867,8 @@ vive_controller_device_update(struct vive_controller_device *d)
|
|||
{
|
||||
uint8_t buf[FEATURE_BUFFER_SIZE];
|
||||
do {
|
||||
int ret = os_hid_read(d->controller_hid, buf, sizeof(buf), 0);
|
||||
int ret =
|
||||
os_hid_read(d->controller_hid, buf, sizeof(buf), 1000);
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue