Closed Bug 1318586 Opened 5 years ago Closed 5 years ago

[webvr] Adjust OpenVR controller button mapping


(Core :: Graphics, defect)

Not set



Tracking Status
firefox53 --- fixed


(Reporter: daoshengmu, Assigned: daoshengmu)



(1 file)

Our current button mapping follows OpenVR sdk. But, it is not mapped to other WebVR projects, like Chromium is also do the same thing,

Our current implementation follows OpenVR's header, One thing we could enhance is checking SupportedButtons property for different devices' button support.
uint64_t supported_buttons = vr_system_->GetUint64TrackedDeviceProperty(deviceId, vr::Prop_SupportedButtons_Uint64);
Assignee: nobody → dmu
After discussing with MozVR team, we hope to make the button mapping to be consistency with the current WebVR projects in this short term.

And we will keep discussing with other implementers to finalize the decision about the mapping.
Because Kip's back, I change the r? to kip.
gw280, thanks for your help.
Comment on attachment 8812107 [details]
Bug 1318586 - Adjust OpenVR controller button mapping to be consistency;

This looks good to me.  r=me with a small comment to warn people that changing the order of the buttons could break web content

::: gfx/vr/gfxVROpenVR.cpp:64
(Diff revision 2)
>  static pfn_VR_GetGenericInterface vr_GetGenericInterface = nullptr;
>  // EButton_System, EButton_DPad_xx, and EButton_A
>  // can not be triggered in Steam Vive in OpenVR SDK 1.0.3.
>  const uint64_t gOpenVRButtonMask[] = {
>    // vr::ButtonMaskFromId(vr::EVRButtonId::k_EButton_System),

Perhaps a short comment here stating that changing the order of these buttons may break web content could be useful.
Attachment #8812107 - Flags: review?(kgilbert) → review+
Keywords: checkin-needed
Pushed by
Adjust OpenVR controller button mapping to be consistency; r=kip
Keywords: checkin-needed
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.