mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
c/main: Check xdev view_count early and add error message
This commit is contained in:
parent
06ff114a7d
commit
b2c4134113
|
@ -964,6 +964,11 @@ comp_main_create_system_compositor(struct xrt_device *xdev,
|
||||||
|
|
||||||
COMP_DEBUG(c, "Doing init %p", (void *)c);
|
COMP_DEBUG(c, "Doing init %p", (void *)c);
|
||||||
|
|
||||||
|
if (xdev->hmd->view_count == 0) {
|
||||||
|
U_LOG_E("Bug detected: HMD \"%s\" does not set xdev->hmd.view_count. Value must be > 0!", xdev->str);
|
||||||
|
assert(xdev->hmd->view_count > 0);
|
||||||
|
}
|
||||||
|
|
||||||
// Do this as early as possible.
|
// Do this as early as possible.
|
||||||
comp_base_init(&c->base);
|
comp_base_init(&c->base);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue