Allow opt out of hand tracking

This commit is contained in:
Patrick Nicolas
2024-10-22 10:36:27 +02:00
parent 08d19bd94d
commit 281b04cbc2
9 changed files with 95 additions and 47 deletions
+5
View File
@@ -95,6 +95,10 @@ bool configuration::check_feature(feature f) const
{
case feature::microphone:
break;
case feature::hand_tracking:
if (not application::get_hand_tracking_supported())
return false;
break;
case feature::eye_gaze:
if (not application::get_eye_gaze_supported())
return false;
@@ -138,6 +142,7 @@ void configuration::set_feature(feature f, bool state)
configuration::configuration(xr::system & system)
{
passthrough_enabled = system.passthrough_supported() == xr::system::passthrough_type::color;
features[feature::hand_tracking] = application::get_hand_tracking_supported();
try
{
simdjson::dom::parser parser;