Skip to content

Commit

Permalink
Fix bug reporting HMD when we shouldn't be.
Browse files Browse the repository at this point in the history
This boils down to: Detection occurs in two phases,
and I only stopped one of the phases from looking at the HMD.

Alternative fix could have been to prevent the second phase from
adding trackers to the current set, but eh.
  • Loading branch information
kitlith committed Jul 2, 2023
1 parent a1cc13f commit e04191f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,10 @@ class Trackers {
}

for (unsigned int jjj = 0; jjj < (int)BodyPosition::BodyPosition_Count; ++jjj) {
if (!enable_hmd && jjj == (int)BodyPosition::Head) {
continue; // don't query the head if we aren't reporting it.
}

InputPoseActionData_t pose;
input_error = input->GetPoseActionDataRelativeToNow(action_handles[jjj], universe, 0, &pose, sizeof(pose), 0);
if (input_error != EVRInputError::VRInputError_None) {
Expand Down

0 comments on commit e04191f

Please sign in to comment.