Bug 1514192 - Fixing Oculus Touch touch events error. r=kip, a=RyanVM
authorDaosheng Mu <daoshengmu@gmail.com>
Wed, 02 Jan 2019 19:52:43 +0000
changeset 509297 3c697557546a791ba786a58478113d10f939c25c
parent 509296 71e27c73bb26924823d74fa345a27fb243d4a0e9
child 509298 ab6723fb0cefb88a1325ebca507dafa15e6e479a
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskip, RyanVM
bugs1514192
milestone65.0
Bug 1514192 - Fixing Oculus Touch touch events error. r=kip, a=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D15589
gfx/vr/service/OculusSession.cpp
--- a/gfx/vr/service/OculusSession.cpp
+++ b/gfx/vr/service/OculusSession.cpp
@@ -151,19 +151,19 @@ dom::GamepadHand OculusControllerHand[2]
 ovrButton OculusControllerButtons[2][kNumOculusButtons] = {
     {ovrButton_LThumb, (ovrButton)0, (ovrButton)0, ovrButton_X, ovrButton_Y,
      (ovrButton)0},
     {ovrButton_RThumb, (ovrButton)0, (ovrButton)0, ovrButton_A, ovrButton_B,
      (ovrButton)0},
 };
 
 ovrTouch OculusControllerTouches[2][kNumOculusButtons] = {
-    {(ovrTouch)0, ovrTouch_LIndexTrigger, (ovrTouch)0, (ovrTouch)0, (ovrTouch)0,
+    {ovrTouch_LThumb, ovrTouch_LIndexTrigger, (ovrTouch)0, ovrTouch_X, ovrTouch_Y,
      ovrTouch_LThumbRest},
-    {(ovrTouch)0, ovrTouch_RIndexTrigger, (ovrTouch)0, (ovrTouch)0, (ovrTouch)0,
+    {ovrTouch_RThumb, ovrTouch_RIndexTrigger, (ovrTouch)0, ovrTouch_A, ovrTouch_B,
      ovrTouch_RThumbRest},
 };
 
 void UpdateButton(const ovrInputState& aInputState, uint32_t aHandIdx,
                   uint32_t aButtonIdx, VRControllerState& aControllerState) {
   if (aInputState.Buttons & OculusControllerButtons[aHandIdx][aButtonIdx]) {
     aControllerState.buttonPressed |= ((uint64_t)1 << aButtonIdx);
   }