Add quirk to prevent discarding frames
This commit is contained in:
@@ -167,6 +167,7 @@ const hmd_traits_t hmd_traits = [] {
|
||||
traits.permissions[feature::eye_gaze] = "com.picovr.permission.EYE_TRACKING";
|
||||
traits.permissions[feature::face_tracking] = "com.picovr.permission.FACE_TRACKING";
|
||||
traits.view_locate = false;
|
||||
traits.discard_frame = false;
|
||||
const auto pico_model = get_property("pxr.vendorhw.product.model");
|
||||
spdlog::info(" pxr.vendorhw.product.model = \"{}\":", pico_model.value_or("<unset>"));
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ extern const struct hmd_traits_t
|
||||
bool bind_simple_controller = true;
|
||||
bool hand_interaction_grip_surface = true;
|
||||
bool pico_face_tracker = false;
|
||||
bool discard_frame = true; // can do xrBeginFrame twice to discard the first one
|
||||
|
||||
XrViewConfigurationView override_view(XrViewConfigurationView) const;
|
||||
} hmd_traits;
|
||||
|
||||
@@ -934,7 +934,8 @@ void scenes::stream::render(const XrFrameState & frame_state)
|
||||
}
|
||||
|
||||
// Allow the headset to time warp if we are redisplaying a frame
|
||||
if (std::ranges::any_of(current_blit_handles, [](const auto & h) { return h and h->feedback.times_displayed < 2; }) or
|
||||
if ((not hmd_traits.discard_frame) or
|
||||
std::ranges::any_of(current_blit_handles, [](const auto & h) { return h and h->feedback.times_displayed < 2; }) or
|
||||
is_gui_interactable())
|
||||
{
|
||||
XrExtent2Di extents[view_count];
|
||||
|
||||
Reference in New Issue
Block a user