From 2f195857e7eb2be43db1d2763cca4fd799f70943 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sat, 5 Apr 2025 18:31:38 +0200 Subject: [PATCH] Prefer FB passthrough over base OpenXR one --- client/xr/session.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/xr/session.cpp b/client/xr/session.cpp index 143931d2..2b51405f 100644 --- a/client/xr/session.cpp +++ b/client/xr/session.cpp @@ -383,11 +383,7 @@ void xr::session::enable_passthrough(xr::system & system) if (system.passthrough_supported() == xr::system::passthrough_type::no_passthrough) return; - if (utils::contains(system.environment_blend_modes(XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO), XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND)) - { - passthrough.emplace(); - } - else if (utils::contains(application::get_xr_extensions(), XR_FB_PASSTHROUGH_EXTENSION_NAME)) + if (utils::contains(application::get_xr_extensions(), XR_FB_PASSTHROUGH_EXTENSION_NAME)) { passthrough.emplace(*inst, *this); } @@ -395,6 +391,10 @@ void xr::session::enable_passthrough(xr::system & system) { passthrough.emplace(*inst, *this); } + else if (utils::contains(system.environment_blend_modes(XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO), XR_ENVIRONMENT_BLEND_MODE_ALPHA_BLEND)) + { + passthrough.emplace(); + } } void xr::session::disable_passthrough()