From bfd102831ec3d7106335702307a953c7607610b1 Mon Sep 17 00:00:00 2001 From: Sapphire Date: Sat, 7 Jun 2025 23:07:55 -0500 Subject: [PATCH] workaround quest runtime bugs --- client/application.cpp | 2 ++ client/scenes/stream_tracking.cpp | 8 +++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/application.cpp b/client/application.cpp index e0d30712..ebcca4c2 100644 --- a/client/application.cpp +++ b/client/application.cpp @@ -1226,6 +1226,8 @@ void application::initialize() if (fb_body_tracking_supported) { fb_body_tracker = xr_session.create_fb_body_tracker(); + // HACK: always have an active body tracker so the quest runtime doesn't blow up (crash in random functions, controllers not working) + fb_body_tracker.start(false, false); } if (pico_body_tracking_supported) diff --git a/client/scenes/stream_tracking.cpp b/client/scenes/stream_tracking.cpp index 3ad46555..2bfe7d17 100644 --- a/client/scenes/stream_tracking.cpp +++ b/client/scenes/stream_tracking.cpp @@ -272,8 +272,9 @@ void scenes::stream::tracking() if (application::get_fb_body_tracking_supported()) { body_tracking = body_fb; - // We start the tracker on connection because there are togglable settings. - // TODO handle reconnection? + // We start the tracker on connection because there are toggleable settings. + // TODO maybe handle reconnection better, if the settings are changed the tracker count will mismatch and stuff might break + application::get_fb_body_tracker().stop(); application::get_fb_body_tracker().start(config.fb_lower_body, config.fb_hip); } else if (application::get_pico_body_tracking_supported()) @@ -509,9 +510,6 @@ void scenes::stream::tracking() if (face_tracking == from_headset::face_type::pico) application::get_pico_face_tracker().stop(); - - if (body_tracking == body_fb) - application::get_fb_body_tracker().stop(); } void scenes::stream::operator()(to_headset::tracking_control && packet)