From e4636ca15303e2b932294d3c8a07b7cd53d482fb Mon Sep 17 00:00:00 2001 From: Christoph Haag Date: Mon, 22 Jul 2024 03:09:10 +0200 Subject: [PATCH] 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: --- src/xrt/state_trackers/oxr/oxr_space.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xrt/state_trackers/oxr/oxr_space.c b/src/xrt/state_trackers/oxr/oxr_space.c index eb84734fb..d12975aab 100644 --- a/src/xrt/state_trackers/oxr/oxr_space.c +++ b/src/xrt/state_trackers/oxr/oxr_space.c @@ -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;