The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Jan Schmidt and committed by
Marge Bot
ecaab0f6 34377371

+3 -1
+3 -1
src/xrt/drivers/wmr/wmr_hmd.c
··· 2138 2138 if (wmr_hmd_request_controller_status(wh)) { 2139 2139 /* @todo: Add a timed version of os_cond_wait and a timeout? */ 2140 2140 /* This will be signalled from the reader thread */ 2141 - os_cond_wait(&wh->controller_status_cond, &wh->controller_status_lock); 2141 + while (!wh->have_left_controller_status && !wh->have_right_controller_status) { 2142 + os_cond_wait(&wh->controller_status_cond, &wh->controller_status_lock); 2143 + } 2142 2144 have_controller_status = true; 2143 2145 } 2144 2146 os_mutex_unlock(&wh->controller_status_lock);