diff --git a/client/application.cpp b/client/application.cpp index 358a171c..577e1b9c 100644 --- a/client/application.cpp +++ b/client/application.cpp @@ -226,11 +226,12 @@ static std::vector interaction_profiles{ "/user/hand/right/input/aim/pose", "/user/hand/left/input/x/click", - "/user/hand/left/input/x/touch", "/user/hand/left/input/y/click", - "/user/hand/left/input/y/touch", "/user/hand/left/input/menu/click", + "/user/hand/left/input/squeeze/click", + "/user/hand/left/input/squeeze/touch", "/user/hand/left/input/squeeze/value", + "/user/hand/left/input/trigger/click", "/user/hand/left/input/trigger/value", "/user/hand/left/input/trigger/touch", "/user/hand/left/input/thumbrest/touch", @@ -239,11 +240,12 @@ static std::vector interaction_profiles{ "/user/hand/left/input/thumbstick/touch", "/user/hand/right/input/a/click", - "/user/hand/right/input/a/touch", "/user/hand/right/input/b/click", - "/user/hand/right/input/b/touch", "/user/hand/right/input/system/click", + "/user/hand/right/input/squeeze/click", + "/user/hand/right/input/squeeze/touch", "/user/hand/right/input/squeeze/value", + "/user/hand/right/input/trigger/click", "/user/hand/right/input/trigger/value", "/user/hand/right/input/trigger/touch", "/user/hand/right/input/thumbstick", @@ -1313,15 +1315,23 @@ void application::interaction_profile_changed() spdlog::info("Global actions:"); for(auto& [action, type, name]: actions) { - auto sources = xr_session.localized_sources_for_action(action); - if (!sources.empty()) + try { - spdlog::info(" Sources for {}", name); - for (auto & k: sources) - spdlog::info(" {}", k); + auto sources = xr_session.localized_sources_for_action(action); + if (!sources.empty()) + { + spdlog::info(" Sources for {}", name); + for (auto & k: sources) + spdlog::info(" {}", k); + } + else + spdlog::info(" No source for {}", name); + } + catch(std::exception& e) + { + spdlog::warn("Error enumerating sources for {}: {}", name, e.what()); + continue; } - else - spdlog::warn(" No source for {}", name); } if (current_scene()) @@ -1332,15 +1342,23 @@ void application::interaction_profile_changed() { auto [action, type] = action_and_type; - auto sources = xr_session.localized_sources_for_action(action); - if (!sources.empty()) + try { - spdlog::info(" Sources for {}", name); - for (auto & k: sources) - spdlog::info(" {}", k); + auto sources = xr_session.localized_sources_for_action(action); + if (!sources.empty()) + { + spdlog::info(" Sources for {}", name); + for (auto & k: sources) + spdlog::info(" {}", k); + } + else + spdlog::info(" No source for {}", name); + } + catch(std::exception& e) + { + spdlog::warn("Error enumerating sources for {}: {}", name, e.what()); + continue; } - else - spdlog::warn(" No source for {}", name); } } } diff --git a/client/hardware.cpp b/client/hardware.cpp index 84f8aea9..42e2edf7 100644 --- a/client/hardware.cpp +++ b/client/hardware.cpp @@ -63,8 +63,6 @@ model guess_model() return model::meta_quest_pro; if (device == "eureka") return model::meta_quest_3; - if (device == "TBD") - return model::htc_vive_focus_3; if (manufacturer == "Pico") { @@ -74,6 +72,14 @@ model guess_model() spdlog::info("manufacturer={}, model={}, device={} assuming Pico 4", manufacturer, model, device); return model::pico_4; } + if (manufacturer == "HTC") + { + if (model == "VIVE Focus 3") + return model::htc_vive_focus_3; + + if (model == "VIVE XR Series") + return model::htc_vive_xr_elite; + } spdlog::info("Unknown model, manufacturer={}, model={}, device={}", manufacturer, model, device); #endif @@ -122,6 +128,11 @@ XrViewConfigurationView override_view(XrViewConfigurationView view, model m) view.recommendedImageRectWidth = 2448; view.recommendedImageRectHeight = 2448; return view; + case model::htc_vive_xr_elite: + spdlog::info("Using panel resolution 1920x1920 for HTC Vive XR Elite"); + view.recommendedImageRectWidth = 1920; + view.recommendedImageRectHeight = 1920; + return view; case model::unknown: return view; } diff --git a/client/hardware.h b/client/hardware.h index 15fc5523..b470ba96 100644 --- a/client/hardware.h +++ b/client/hardware.h @@ -29,6 +29,7 @@ enum class model pico_neo_3, pico_4, htc_vive_focus_3, + htc_vive_xr_elite, unknown }; diff --git a/client/scenes/lobby.cpp b/client/scenes/lobby.cpp index dc2ecb19..b8401489 100644 --- a/client/scenes/lobby.cpp +++ b/client/scenes/lobby.cpp @@ -82,6 +82,7 @@ static std::string choose_webxr_profile() case model::pico_4: return "pico-4"; case model::htc_vive_focus_3: + case model::htc_vive_xr_elite: return "htc-vive-focus-3"; case model::unknown: return "generic-trigger-squeeze";