From 4c2a5cd3feb74f7281b2e6a381672fc616c04034 Mon Sep 17 00:00:00 2001 From: Mathew Tkachuk Date: Fri, 31 Jan 2025 21:17:05 +0300 Subject: [PATCH] refactor: Add introduced models where applicable Rebased on master. Pico G3 controller profile should be added in a separate PR. Models other than Pico 4 Pro and Pico 4 Enterprise do support audio-based face tracking. --- alvr/client_openxr/src/interaction.rs | 10 ++++++++-- alvr/client_openxr/src/lib.rs | 6 +++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/alvr/client_openxr/src/interaction.rs b/alvr/client_openxr/src/interaction.rs index f930f0b7f4..048650694c 100644 --- a/alvr/client_openxr/src/interaction.rs +++ b/alvr/client_openxr/src/interaction.rs @@ -138,7 +138,9 @@ impl InteractionContext { p if p.is_quest() => QUEST_CONTROLLER_PROFILE_PATH, // todo: create new controller profile for quest pro and 3 Platform::PicoNeo3 => PICO_NEO3_CONTROLLER_PROFILE_PATH, Platform::Pico4Ultra => PICO4S_CONTROLLER_PROFILE_PATH, - p if p.is_pico() => PICO4_CONTROLLER_PROFILE_PATH, + Platform::Pico4 | Platform::Pico4Pro | Platform::Pico4Enterprise => { + PICO4_CONTROLLER_PROFILE_PATH + } p if p.is_vive() => FOCUS3_CONTROLLER_PROFILE_PATH, Platform::Yvr => YVR_CONTROLLER_PROFILE_PATH, _ => QUEST_CONTROLLER_PROFILE_PATH, @@ -286,8 +288,12 @@ impl InteractionContext { && !platform.is_vive() && extra_extensions::supports_eye_gaze_interaction(&xr_session, xr_system) { + // todo: research Pico Neo 3 Pro Eye platform detection #[cfg(target_os = "android")] - if platform.is_pico() { + if matches!( + platform, + Platform::PicoNeo3 | Platform::Pico4Pro | Platform::Pico4Enterprise + ) { alvr_system_info::try_get_permission("com.picovr.permission.EYE_TRACKING") } diff --git a/alvr/client_openxr/src/lib.rs b/alvr/client_openxr/src/lib.rs index 719be4256d..740a51adf9 100644 --- a/alvr/client_openxr/src/lib.rs +++ b/alvr/client_openxr/src/lib.rs @@ -137,7 +137,11 @@ pub fn entry_point() { let loader_suffix = match platform { Platform::Quest1 => "_quest1", - Platform::PicoNeo3 | Platform::PicoG3 | Platform::Pico4 => "_pico_old", + Platform::PicoNeo3 + | Platform::PicoG3 + | Platform::Pico4 + | Platform::Pico4Pro + | Platform::Pico4Enterprise => "_pico_old", Platform::Yvr => "_yvr", Platform::Lynx => "_lynx", _ => "",