Skip to content

Commit

Permalink
Regression: hand interaction profile is not available
Browse files Browse the repository at this point in the history
When we removed the KHR simple profile in c3b539a we also did
delete the code that was handling profiles with no specific
device. That was a mistake because that's precisely the case
of generic profiles like hand interaction.

Restored the code adding those profiles to the list of available
mappings.
  • Loading branch information
svillar committed Jun 11, 2024
1 parent c3b539a commit b277756
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/src/openxr/cpp/OpenXRInputSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,14 @@ XrResult OpenXRInputSource::Initialize()
systemDoF = DoF::IS_6DOF;
}
for (auto& mapping: OpenXRInputMappings) {
if (mDeviceType != mapping.controllerType)
continue;

if (systemDoF != mapping.systemDoF)
// Always populate default/fall-back profiles
if (mapping.controllerType == device::UnknownType) {
mMappings.push_back(mapping);
// Use the system's deviceType instead to ensure we get a valid VRController on WebXR sessions
mMappings.back().controllerType = mDeviceType;
continue;
}
if ((mDeviceType != mapping.controllerType) || (systemDoF != mapping.systemDoF))
continue;
mMappings.push_back(mapping);
}
Expand Down

0 comments on commit b277756

Please sign in to comment.