Closed Bug 1305890 Opened 8 years ago Closed 7 years ago

[webvr] Support Oculus Touch button and analogue inputs in the Gamepad API

Categories

(Core :: Graphics, defect, P3)

x86_64
Windows
defect

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: kip, Assigned: daoshengmu)

References

Details

(Keywords: feature, Whiteboard: [gfx-noted][webvr])

Attachments

(3 files)

      No description provided.
Blocks: 1260558
Keywords: feature
OS: Unspecified → Windows
Priority: -- → P3
Hardware: Unspecified → x86_64
Whiteboard: [gfx-noted]
Whiteboard: [gfx-noted] → [gfx-noted][webvr]
Assignee: nobody → dmu
In this update, I change the gamepad id of Oculus and OpenVR to Chromium's and following the button and axes mapping as they did.
Comment on attachment 8835394 [details]
Bug 1305890 - Part 1: Oculus Touch button inputs support;

https://reviewboard.mozilla.org/r/111100/#review113010

Looks good
Attachment #8835394 - Flags: review?(kgilbert) → review+
Comment on attachment 8835395 [details]
Bug 1305890 - Part 2: Oculus Touch axis move support;

https://reviewboard.mozilla.org/r/111102/#review113030
Attachment #8835395 - Flags: review?(kgilbert) → review+
Comment on attachment 8835917 [details]
Bug 1305890 - Part 3: Change OpenVR and Oculus Touch gamepad id;

https://reviewboard.mozilla.org/r/111474/#review113028

::: gfx/vr/gfxVROculus.cpp:839
(Diff revision 1)
>  
>  VRControllerOculus::VRControllerOculus()
>    : VRControllerHost(VRDeviceType::Oculus)
>  {
>    MOZ_COUNT_CTOR_INHERITED(VRControllerOculus, VRControllerHost);
> -  mControllerInfo.mControllerName.AssignLiteral("Oculus Touch Controller");
> +  mControllerInfo.mControllerName.AssignLiteral("Oculus Touch");

Rather than setting a value of "Oculus Touch" that will later be replaced in VRControllerOculus::SetHand(), perhaps we could refactor VRControllerHost to accept the "hand" parameter in the constructor.  (Assuming that handedness does not change after initialization)

This could be done as a separate clean-up task in another bug; however.
Attachment #8835917 - Flags: review?(kgilbert) → review+
(In reply to :kip (Kearwood Gilbert) from comment #9)
> Comment on attachment 8835917 [details]
> Bug 1305890 - Part 3: Change OpenVR and Oculus Touch gamepad id;
> 
> https://reviewboard.mozilla.org/r/111474/#review113028
> 
> ::: gfx/vr/gfxVROculus.cpp:839
> (Diff revision 1)
> >  
> >  VRControllerOculus::VRControllerOculus()
> >    : VRControllerHost(VRDeviceType::Oculus)
> >  {
> >    MOZ_COUNT_CTOR_INHERITED(VRControllerOculus, VRControllerHost);
> > -  mControllerInfo.mControllerName.AssignLiteral("Oculus Touch Controller");
> > +  mControllerInfo.mControllerName.AssignLiteral("Oculus Touch");
> 
> Rather than setting a value of "Oculus Touch" that will later be replaced in
> VRControllerOculus::SetHand(), perhaps we could refactor VRControllerHost to
> accept the "hand" parameter in the constructor.  (Assuming that handedness
> does not change after initialization)
> 
> This could be done as a separate clean-up task in another bug; however.

Good suggestion. I will refactor it at the follow-up bug.

Thanks.
Pushed by dmu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4ce888be3200
Part 1: Oculus Touch button inputs support; r=kip
https://hg.mozilla.org/integration/autoland/rev/23b92e78be6b
Part 2: Oculus Touch axis move support; r=kip
https://hg.mozilla.org/integration/autoland/rev/e6a5ccd4772d
Part 3: Change OpenVR and Oculus Touch gamepad id; r=kip
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: