From 50a0f1a0edecbc611ae47c7ad84894c9ec9188fb Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Wed, 6 May 2026 21:18:39 +0200 Subject: [PATCH] Add quirk to prevent discarding frames --- client/hardware.cpp | 1 + client/hardware.h | 1 + client/scenes/stream.cpp | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client/hardware.cpp b/client/hardware.cpp index 1a6e4133..580e1c98 100644 --- a/client/hardware.cpp +++ b/client/hardware.cpp @@ -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("")); diff --git a/client/hardware.h b/client/hardware.h index f1c008eb..317558da 100644 --- a/client/hardware.h +++ b/client/hardware.h @@ -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; diff --git a/client/scenes/stream.cpp b/client/scenes/stream.cpp index 89cb7c5f..283982cc 100644 --- a/client/scenes/stream.cpp +++ b/client/scenes/stream.cpp @@ -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];