mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 02:26:16 +00:00
d/wmr: Fix controller status report waiting
For Reverb G2 and Odyssey, check if controller status reports were already seen before proceeding to wait, or the driver might not get woken again. Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2188>
This commit is contained in:
parent
34377371ba
commit
ecaab0f63e
|
@ -2138,7 +2138,9 @@ wmr_hmd_create(enum wmr_headset_type hmd_type,
|
|||
if (wmr_hmd_request_controller_status(wh)) {
|
||||
/* @todo: Add a timed version of os_cond_wait and a timeout? */
|
||||
/* This will be signalled from the reader thread */
|
||||
while (!wh->have_left_controller_status && !wh->have_right_controller_status) {
|
||||
os_cond_wait(&wh->controller_status_cond, &wh->controller_status_lock);
|
||||
}
|
||||
have_controller_status = true;
|
||||
}
|
||||
os_mutex_unlock(&wh->controller_status_lock);
|
||||
|
|
Loading…
Reference in a new issue