t/common: Fix creation on no driver available

Only say we can create a system if we have a driver in legacy builder.
This commit is contained in:
Gabriele Boccone 2023-10-19 11:16:58 +02:00 committed by Jakob Bornecrantz
parent b500272c0b
commit ce90c0a1c7

View file

@ -99,9 +99,12 @@ legacy_estimate_system(struct xrt_builder *xb,
struct xrt_prober *xp,
struct xrt_builder_estimate *estimate)
{
estimate->maybe.head = true;
estimate->maybe.left = true;
estimate->maybe.right = true;
// If no driver is enabled, there is no way to create a HMD
bool may_create_hmd = xb->driver_identifier_count > 0;
estimate->maybe.head = may_create_hmd;
estimate->maybe.left = may_create_hmd;
estimate->maybe.right = may_create_hmd;
estimate->priority = -20;
return XRT_SUCCESS;