Bug 1324147 - Remove MOZ_GAMEPAD_BACKEND; r=daoshengmu
authorKyle Machulis <kyle@nonpolynomial.com>
Wed, 27 Jun 2018 12:32:36 -0700
changeset 481742 bf9a0a4642fe334499f1c73ee2ab5da89c1dd3f2
parent 481741 53f871a09b871967c39fbe51e20dfd55fafcd72d
child 481743 50c30489f3789be4998f3405519ef69cd7b2674b
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdaoshengmu
bugs1324147
milestone63.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 1324147 - Remove MOZ_GAMEPAD_BACKEND; r=daoshengmu MOZ_WIDGET_TOOLKIT can be used for platform choice for Gamepad. Need to leave linux header check in configure for now. MozReview-Commit-ID: VT7T2KmLts
dom/gamepad/moz.build
old-configure.in
--- a/dom/gamepad/moz.build
+++ b/dom/gamepad/moz.build
@@ -41,35 +41,35 @@ UNIFIED_SOURCES = [
     'GamepadPose.cpp',
     'GamepadServiceTest.cpp',
     'ipc/GamepadEventChannelChild.cpp',
     'ipc/GamepadEventChannelParent.cpp',
     'ipc/GamepadTestChannelChild.cpp',
     'ipc/GamepadTestChannelParent.cpp'
 ]
 
-if CONFIG['MOZ_GAMEPAD_BACKEND'] == 'stub':
-    UNIFIED_SOURCES += [
-        'fallback/FallbackGamepad.cpp'
-    ]
-elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'cocoa':
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     UNIFIED_SOURCES += [
         'cocoa/CocoaGamepad.cpp'
     ]
-elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'windows':
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
     UNIFIED_SOURCES += [
         'windows/WindowsGamepad.cpp'
     ]
-elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'linux':
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
+    UNIFIED_SOURCES += [
+        'android/AndroidGamepad.cpp'
+    ]
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk3':
     UNIFIED_SOURCES += [
         'linux/LinuxGamepad.cpp'
     ]
-elif CONFIG['MOZ_GAMEPAD_BACKEND'] == 'android':
+else:
     UNIFIED_SOURCES += [
-        'android/AndroidGamepad.cpp'
+        'fallback/FallbackGamepad.cpp'
     ]
 
 LOCAL_INCLUDES += [
     'ipc',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
--- a/old-configure.in
+++ b/old-configure.in
@@ -2672,42 +2672,24 @@ if test -n "$MOZ_ANGLE_RENDERER"; then
 fi # MOZ_ANGLE_RENDERER
 
 fi # COMPILE_ENVIRONMENT
 
 
 dnl ========================================================
 dnl Gamepad support
 dnl ========================================================
-MOZ_GAMEPAD_BACKEND=stub
-
-case "$OS_TARGET" in
-Darwin)
-    if test -z "$MOZ_IOS"; then
-        MOZ_GAMEPAD_BACKEND=cocoa
-    fi
-    ;;
-WINNT)
-    MOZ_GAMEPAD_BACKEND=windows
-    ;;
-Linux)
+
+dnl Moved gamepad platform check to moz.build, linux header check still needed here.
+if test "$OS_TARGET" = "Linux"; then
     MOZ_CHECK_HEADER([linux/joystick.h])
     if test "$ac_cv_header_linux_joystick_h" != "yes"; then
       AC_MSG_ERROR([Can't find header linux/joystick.h, needed for gamepad support. Please install Linux kernel headers.])
     fi
-    MOZ_GAMEPAD_BACKEND=linux
-    ;;
-Android)
-    MOZ_GAMEPAD_BACKEND=android
-    ;;
-*)
-    ;;
-esac
-
-AC_SUBST(MOZ_GAMEPAD_BACKEND)
+fi
 
 dnl ========================================================
 dnl = Breakpad crash reporting (on by default on supported platforms)
 dnl ========================================================
 
 case $target in
 i?86-*-mingw*|x86_64-*-mingw*)
   MOZ_CRASHREPORTER=1