Automatically enable passthrough if color passthrough is supported

This commit is contained in:
Guillaume Meunier
2024-03-16 20:05:57 +01:00
parent b60c1f7b61
commit 3a02198156
9 changed files with 74 additions and 28 deletions
+4 -3
View File
@@ -187,6 +187,9 @@ scenes::lobby::lobby()
if (std::getenv("WIVRN_AUTOCONNECT"))
force_autoconnect = true;
passthrough_supported = system.passthrough_supported();
passthrough_enabled = passthrough_supported == xr::system::passthrough_type::color;
try
{
simdjson::dom::parser parser;
@@ -265,9 +268,7 @@ scenes::lobby::lobby()
spdlog::info("Using format {}", vk::to_string(swapchain_format));
passthrough_supported = system.passthrough_supported();
if (passthrough_supported)
if (passthrough_supported != xr::system::passthrough_type::no_passthrough)
{
if (utils::contains(application::get_xr_extensions(), XR_FB_PASSTHROUGH_EXTENSION_NAME))
{