Make virtual tracker xdevs toggleable

Co-authored-by: Guillaume Meunier <guillaume.meunier@centraliens.net>
This commit is contained in:
Sapphire
2026-07-10 14:52:50 -05:00
co-authored by Guillaume Meunier
parent 727445520e
commit 1cc61fd07a
18 changed files with 268 additions and 67 deletions
+8
View File
@@ -117,6 +117,9 @@ xrt_result_t wivrn_generic_tracker::get_tracked_pose(xrt_input_name name, int64_
{
XrTime production_timestamp;
if (!enabled)
return XRT_ERROR_INPUT_UNSUPPORTED;
if (name == XRT_INPUT_GENERIC_TRACKER_POSE)
{
std::tie(production_timestamp, *res) = poses.get_at(at_timestamp_ns);
@@ -133,4 +136,9 @@ void wivrn_generic_tracker::update_tracking(XrTime produced_timestamp, XrTime ti
{
poses.update_tracking(produced_timestamp, timestamp, pose, offset);
}
void wivrn_generic_tracker::set_enabled(bool enabled)
{
this->enabled = enabled;
}
} // namespace wivrn