Use SDL_hidapi.c instead of the platform specific hid.c implementations when libusb isn't available
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
diff --git a/configure b/configure
index 2f6779f..6952795 100755
--- a/configure
+++ b/configure
@@ -24364,17 +24364,7 @@ _ACEOF
fi
else
- case "$host" in
- *-*-cygwin* | *-*-mingw32* )
- SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
- ;;
- *-*-darwin* )
- SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
- ;;
- * )
- SOURCES="$SOURCES $srcdir/src/hidapi/linux/hid.c"
- ;;
- esac
+ SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
fi
fi
diff --git a/configure.ac b/configure.ac
index c3a6055..b2ae68b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3315,6 +3315,7 @@ AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[d
AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
+ SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
if test x$have_libusb_h = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
@@ -3342,17 +3343,7 @@ AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[d
AC_DEFINE_UNQUOTED(SDL_LIBUSB_DYNAMIC, "$libusb_lib", [ ])
fi
else
- case "$host" in
- *-*-cygwin* | *-*-mingw32* )
- SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
- ;;
- *-*-darwin* )
- SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
- ;;
- * )
- SOURCES="$SOURCES $srcdir/src/hidapi/linux/hid.c"
- ;;
- esac
+ SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
fi
fi