c/direct_mode: Print meaningful error if no display matches NVIDIA whitelist.

This commit is contained in:
Lubosz Sarnecki 2020-04-03 17:22:53 +02:00 committed by Jakob Bornecrantz
parent 7da70568be
commit 56a8e80844

View file

@ -359,6 +359,23 @@ comp_window_direct_init_nvidia(struct comp_window *w)
break;
}
if (w_direct->num_nv_displays == 0) {
COMP_ERROR(w->c,
"NVIDIA: No machting displays found. "
"Is your headset whitelisted?");
COMP_ERROR(w->c, "== Whitelist ==");
for (uint32_t i = 0; i < ARRAY_SIZE(NV_DIRECT_WHITELIST); i++)
COMP_ERROR(w->c, "%s", NV_DIRECT_WHITELIST[i]);
COMP_ERROR(w->c, "== Available ==");
for (uint32_t i = 0; i < display_count; i++)
COMP_ERROR(w->c, "%s", display_props[i].displayName);
free(display_props);
return false;
}
free(display_props);
return true;