st/oxr: return XR_SPACE_BOUNDS_UNAVAILABLE for unimplemented function

Fixes d7c1f7f13

Since d7c1f7f13 OXR_CHECK_XRET the return code
XRT_ERROR_COMPOSITOR_FUNCTION_NOT_IMPLEMENTED or (XRT_ERROR_NOT_IMPLEMENTED)
was translated to returning an XR_RUNTIME_FAILURE to the app with the
OXR_CHECK_XRET macro.

That the function is not implemented on an xrt_device is an implementation
detail in monado that we don't need to pass along to the application, the
application only needs to know that bounds are not available.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2289>
This commit is contained in:
Christoph Haag committed 2024-07-22 03:09:10 +02:00
1 parent d86ca89da5
commit e4636ca153
1 file changed
+1 -1
+1 -1
View File
@@ -175,7 +175,7 @@ oxr_space_get_reference_bounds_rect(struct oxr_logger *log,
enum xrt_reference_space_type reference_space_type = xr_ref_space_to_xrt(referenceSpaceType);
xrt_result_t xret = xrt_comp_get_reference_bounds_rect(xc, reference_space_type, (struct xrt_vec2 *)bounds);
if (xret == XRT_SPACE_BOUNDS_UNAVAILABLE) {
if (xret == XRT_SPACE_BOUNDS_UNAVAILABLE || xret == XRT_ERROR_NOT_IMPLEMENTED) {
// `bounds` must be set to 0 on XR_SPACE_BOUNDS_UNAVAILABLE
*bounds = (XrExtent2Df){0};
return XR_SPACE_BOUNDS_UNAVAILABLE;