mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-15 02:00:22 +00:00
d/hdk: Use 100 ms hid read timeout
Avoids burning cpu cycles with busy looping
This commit is contained in:
parent
c9405e946f
commit
4030b474ad
|
@ -124,7 +124,7 @@ hdk_device_update(struct hdk_device *hd)
|
|||
{
|
||||
uint8_t buffer[MSG_LEN_LARGE];
|
||||
|
||||
auto bytesRead = os_hid_read(hd->dev, buffer, sizeof(buffer), 0);
|
||||
auto bytesRead = os_hid_read(hd->dev, buffer, sizeof(buffer), 100);
|
||||
if (bytesRead == -1) {
|
||||
if (!hd->disconnect_notified) {
|
||||
HDK_ERROR(hd,
|
||||
|
|
Loading…
Reference in a new issue