Add checkboxes for eye and face tracking

This commit is contained in:
Patrick Nicolas
2024-09-21 20:51:08 +02:00
committed by Guillaume Meunier
parent 76626b8133
commit e80c6cdd67
4 changed files with 49 additions and 10 deletions
+29 -5
View File
@@ -380,13 +380,37 @@ void scenes::lobby::gui_settings()
vibrate_on_hover();
}
bool enabled = config.check_feature(feature::microphone);
if (ImGui::Checkbox(_S("Enable microphone"), &enabled))
{
config.set_feature(feature::microphone, enabled);
config.save();
bool enabled = config.check_feature(feature::microphone);
if (ImGui::Checkbox(_S("Enable microphone"), &enabled))
{
config.set_feature(feature::microphone, enabled);
config.save();
}
vibrate_on_hover();
}
{
ImGui::BeginDisabled(not application::get_eye_gaze_supported());
bool enabled = config.check_feature(feature::eye_gaze);
if (ImGui::Checkbox(_S("Enable eye tracking"), &enabled))
{
config.set_feature(feature::eye_gaze, enabled);
config.save();
}
vibrate_on_hover();
ImGui::EndDisabled();
}
{
ImGui::BeginDisabled(not application::get_fb_face_tracking2_supported());
bool enabled = config.check_feature(feature::face_tracking);
if (ImGui::Checkbox(_S("Enable face tracking"), &enabled))
{
config.set_feature(feature::face_tracking, enabled);
config.save();
}
ImGui::EndDisabled();
vibrate_on_hover();
}
vibrate_on_hover();
ImGui::BeginDisabled(passthrough_supported == xr::system::passthrough_type::no_passthrough);
if (ImGui::Checkbox(_S("Enable video passthrough in lobby"), &config.passthrough_enabled))
+5 -3
View File
@@ -118,12 +118,14 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
if (info.available_refresh_rates.empty())
spdlog::warn("Unable to detect refresh rates");
const auto & config = application::get_config();
info.hand_tracking = application::get_hand_tracking_supported();
info.eye_gaze = application::get_eye_gaze_supported();
info.face_tracking2_fb = application::get_fb_face_tracking2_supported();
info.eye_gaze = config.check_feature(feature::eye_gaze);
info.face_tracking2_fb = config.check_feature(feature::face_tracking);
audio::get_audio_description(info);
if (not(application::get_config().check_feature(feature::microphone)))
if (not(config.check_feature(feature::microphone)))
info.microphone = {};
info.supported_codecs = decoder_impl::supported_codecs();