Form factor check support
This MR intends to support XR_ERROR_FORM_FACTOR_UNAVAILABLE
while calling xrGetSystem
. According to the specification:
If the form factor is supported but temporarily unavailable, xrGetSystem must return XR_ERROR_FORM_FACTOR_UNAVAILABLE. A runtime may return XR_SUCCESS on a subsequent call for a form factor it previously returned XR_ERROR_FORM_FACTOR_UNAVAILABLE. For example, connecting or warming up hardware might cause an unavailable form factor to become available.
Adding xrt_device::form_factor_check_supported
and xrt_device::is_form_factor_available
. If HMD driver supports the check, xrGetSystem
can determine either request form factor is available or not from xrt_device.
Tested with android_sensor driver offline with Pixel 4.
Edited by Jarvis Huang