Make virtual tracker xdevs toggleable
Co-authored-by: Guillaume Meunier <guillaume.meunier@centraliens.net>
This commit is contained in:
co-authored by
Guillaume Meunier
parent
727445520e
commit
1cc61fd07a
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user