Skip to content

Commit

Permalink
Use the the system's DeviceType for the generic input profile
Browse files Browse the repository at this point in the history
The generic input profile has the device::UknomnType enumeraton. This
PR changes it by the one provided by Android.
  • Loading branch information
javifernandez committed Sep 27, 2023
1 parent 56b1e41 commit 490ed63
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/src/openxr/cpp/OpenXRInputSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,10 @@ void OpenXRInputSource::Update(const XrFrameState& frameState, XrSpace localSpac

delegate.SetLeftHanded(mIndex, mHandeness == OpenXRHandFlags::Left);
delegate.SetTargetRayMode(mIndex, device::TargetRayMode::TrackedPointer);
delegate.SetControllerType(mIndex, mActiveMapping->controllerType);
if (mActiveMapping->controllerType == device::UnknownType)
delegate.SetControllerType(mIndex, DeviceUtils::GetDeviceTypeFromSystem(false));
else
delegate.SetControllerType(mIndex, mActiveMapping->controllerType);

// Spaces must be created here, it doesn't work if they are created in Initialize (probably a OpenXR SDK bug?)
if (mGripSpace == XR_NULL_HANDLE) {
Expand Down

0 comments on commit 490ed63

Please sign in to comment.