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 49ef327
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/src/openxr/cpp/OpenXRInputSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,15 @@ XrResult OpenXRInputSource::Initialize()
systemDoF = DoF::IS_6DOF;
}
for (auto& mapping: OpenXRInputMappings) {
if (mDeviceType != mapping.controllerType)
// 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;
} else if (mDeviceType != mapping.controllerType) {
continue;
}

if (systemDoF != mapping.systemDoF)
continue;
Expand Down

0 comments on commit 49ef327

Please sign in to comment.