Store face tracker in variant
This commit is contained in:
@@ -728,7 +728,7 @@ void scenes::lobby::gui_settings()
|
||||
ImGui::EndDisabled();
|
||||
}
|
||||
{
|
||||
ImGui::BeginDisabled(not(application::get_fb_face_tracking2_supported() or application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported() or application::get_pico_face_tracking_supported()));
|
||||
ImGui::BeginDisabled(not application::get_face_tracking_supported());
|
||||
bool enabled = config.check_feature(feature::face_tracking);
|
||||
if (ImGui::Checkbox(_S("Enable face tracking"), &enabled))
|
||||
{
|
||||
@@ -1400,7 +1400,7 @@ static const char * get_face_icon(XrTime predicted_display_time)
|
||||
{
|
||||
static const auto w = face_weights();
|
||||
wivrn::from_headset::tracking::fb_face2 expression;
|
||||
application::get_fb_face_tracker2().get_weights(predicted_display_time, expression);
|
||||
std::get<xr::fb_face_tracker2>(application::get_face_tracker()).get_weights(predicted_display_time, expression);
|
||||
|
||||
if (not expression.is_valid)
|
||||
return ICON_FA_FACE_MEH;
|
||||
@@ -1464,24 +1464,16 @@ void scenes::lobby::draw_features_status(XrTime predicted_display_time)
|
||||
});
|
||||
}
|
||||
|
||||
if (application::get_fb_face_tracking2_supported())
|
||||
if (application::get_face_tracking_supported())
|
||||
{
|
||||
const char * icon_enabled = std::holds_alternative<xr::fb_face_tracker2>(application::get_face_tracker())
|
||||
? get_face_icon(predicted_display_time)
|
||||
: ICON_FA_FACE_KISS_WINK_HEART;
|
||||
items.push_back({
|
||||
.f = feature::face_tracking,
|
||||
.tooltip_enabled = _("Face tracking is enabled"),
|
||||
.tooltip_disabled = _("Face tracking is disabled"),
|
||||
.icon_enabled = get_face_icon(predicted_display_time),
|
||||
.icon_disabled = ICON_FA_FACE_MEH_BLANK,
|
||||
});
|
||||
}
|
||||
|
||||
if (application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported() or application::get_pico_face_tracking_supported())
|
||||
{
|
||||
items.push_back({
|
||||
.f = feature::face_tracking,
|
||||
.tooltip_enabled = _("Face tracking is enabled"),
|
||||
.tooltip_disabled = _("Face tracking is disabled"),
|
||||
.icon_enabled = ICON_FA_FACE_KISS_WINK_HEART,
|
||||
.icon_enabled = icon_enabled,
|
||||
.icon_disabled = ICON_FA_FACE_MEH_BLANK,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user