Bug 1545180 - Correct DualShock 4 mapping type. r=qdot
authorDaosheng Mu <daoshengmu@gmail.com>
Thu, 18 Apr 2019 06:44:09 +0000
changeset 470035 7ac3a2da794ed550129b65373c678c5d2d9d4793
parent 470034 928f042ca74e2b75be1eace7fcc138ba571fd3a0
child 470036 0300023c259faa756c90bf52df9a132b5d504794
push id112839
push userapavel@mozilla.com
push dateThu, 18 Apr 2019 21:50:57 +0000
treeherdermozilla-inbound@e0a826fcd85b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersqdot
bugs1545180
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1545180 - Correct DualShock 4 mapping type. r=qdot Differential Revision: https://phabricator.services.mozilla.com/D27945
dom/gamepad/GamepadRemapping.cpp
--- a/dom/gamepad/GamepadRemapping.cpp
+++ b/dom/gamepad/GamepadRemapping.cpp
@@ -95,16 +95,20 @@ class DefaultRemapper final : public Gam
   virtual void SetAxisCount(uint32_t aAxisCount) override {
     numAxes = aAxisCount;
   }
 
   virtual void SetButtonCount(uint32_t aButtonCount) override {
     numButtons = aButtonCount;
   }
 
+  virtual GamepadMappingType GetMappingType() const override {
+    return GamepadMappingType::_empty;
+  }
+
   virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
                                   double aValue) const override {
     RefPtr<GamepadPlatformService> service =
         GamepadPlatformService::GetParentService();
     if (!service) {
       return;
     }
     service->NewAxisMoveEvent(aIndex, aAxis, aValue);
@@ -357,20 +361,16 @@ class StadiaControllerRemapper final : p
 class Dualshock4Remapper final : public GamepadRemapper {
  public:
   virtual uint32_t GetAxisCount() const override { return AXIS_INDEX_COUNT; }
 
   virtual uint32_t GetButtonCount() const override {
     return DUALSHOCK_BUTTON_COUNT;
   }
 
-  virtual GamepadMappingType GetMappingType() const override {
-    return GamepadMappingType::_empty;
-  }
-
   virtual void RemapAxisMoveEvent(uint32_t aIndex, uint32_t aAxis,
                                   double aValue) const override {
     RefPtr<GamepadPlatformService> service =
         GamepadPlatformService::GetParentService();
     if (!service) {
       return;
     }