Skip to content
Permalink
Browse files

Use SDL_hidapi.c instead of the platform specific hid.c implementatio…

…ns when libusb isn't available
  • Loading branch information
slouken committed Nov 25, 2019
1 parent 494af7a commit de6397cfff0e87ea9d823730046994a7efe2c8a3
Showing with 3 additions and 22 deletions.
  1. +1 −11 configure
  2. +2 −11 configure.ac

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

@@ -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

0 comments on commit de6397c

Please sign in to comment.