mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-28 02:26:16 +00:00
a/util: Add assert to catch this bug more conveniently.
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2358>
This commit is contained in:
parent
e052834399
commit
31fdb0bcd0
|
@ -1,4 +1,4 @@
|
||||||
// Copyright 2019-2023, Collabora, Ltd.
|
// Copyright 2019-2024, Collabora, Ltd.
|
||||||
// SPDX-License-Identifier: BSL-1.0
|
// SPDX-License-Identifier: BSL-1.0
|
||||||
/*!
|
/*!
|
||||||
* @file
|
* @file
|
||||||
|
@ -203,6 +203,10 @@ u_device_setup_one_eye(struct xrt_device *xdev, const struct u_device_simple_inf
|
||||||
bool
|
bool
|
||||||
u_device_setup_split_side_by_side(struct xrt_device *xdev, const struct u_device_simple_info *info)
|
u_device_setup_split_side_by_side(struct xrt_device *xdev, const struct u_device_simple_info *info)
|
||||||
{
|
{
|
||||||
|
// 1 or 2 views supported.
|
||||||
|
assert(xdev->hmd->view_count > 0);
|
||||||
|
assert(xdev->hmd->view_count <= 2);
|
||||||
|
assert(xdev->hmd->view_count <= XRT_MAX_VIEWS);
|
||||||
|
|
||||||
uint32_t view_count = xdev->hmd->view_count;
|
uint32_t view_count = xdev->hmd->view_count;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue