The open source OpenXR runtime
0
fork

Configure Feed

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

a/util: Add assert to catch this bug more conveniently.

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2358>

+5 -1
+5 -1
src/xrt/auxiliary/util/u_device.c
··· 1 - // Copyright 2019-2023, Collabora, Ltd. 1 + // Copyright 2019-2024, Collabora, Ltd. 2 2 // SPDX-License-Identifier: BSL-1.0 3 3 /*! 4 4 * @file ··· 203 203 bool 204 204 u_device_setup_split_side_by_side(struct xrt_device *xdev, const struct u_device_simple_info *info) 205 205 { 206 + // 1 or 2 views supported. 207 + assert(xdev->hmd->view_count > 0); 208 + assert(xdev->hmd->view_count <= 2); 209 + assert(xdev->hmd->view_count <= XRT_MAX_VIEWS); 206 210 207 211 uint32_t view_count = xdev->hmd->view_count; 208 212