Use SDL_hidapi.c instead of the platform specific hid.c implementations when libusb isn't available
authorSam Lantinga <slouken@libsdl.org>
Mon, 25 Nov 2019 15:02:48 -0800
changeset 1328738b490ed9e32
parent 13286 fcb5afd26d62
child 13288 7249a6d4aa7e
Use SDL_hidapi.c instead of the platform specific hid.c implementations when libusb isn't available
configure
configure.ac
     1.1 --- a/configure	Mon Nov 25 15:02:45 2019 -0800
     1.2 +++ b/configure	Mon Nov 25 15:02:48 2019 -0800
     1.3 @@ -24364,17 +24364,7 @@
     1.4  
     1.5                  fi
     1.6              else
     1.7 -                case "$host" in
     1.8 -                *-*-cygwin* | *-*-mingw32* )
     1.9 -                    SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
    1.10 -                    ;;
    1.11 -                *-*-darwin* )
    1.12 -                    SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
    1.13 -                    ;;
    1.14 -                * )
    1.15 -                    SOURCES="$SOURCES $srcdir/src/hidapi/linux/hid.c"
    1.16 -                    ;;
    1.17 -                esac
    1.18 +                SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
    1.19              fi
    1.20          fi
    1.21  
     2.1 --- a/configure.ac	Mon Nov 25 15:02:45 2019 -0800
     2.2 +++ b/configure.ac	Mon Nov 25 15:02:48 2019 -0800
     2.3 @@ -3315,6 +3315,7 @@
     2.4              AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
     2.5              EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
     2.6              SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
     2.7 +            SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
     2.8  
     2.9              if test x$have_libusb_h = xyes; then
    2.10                  EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
    2.11 @@ -3342,17 +3343,7 @@
    2.12                      AC_DEFINE_UNQUOTED(SDL_LIBUSB_DYNAMIC, "$libusb_lib", [ ])
    2.13                  fi
    2.14              else
    2.15 -                case "$host" in
    2.16 -                *-*-cygwin* | *-*-mingw32* )
    2.17 -                    SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
    2.18 -                    ;;
    2.19 -                *-*-darwin* )
    2.20 -                    SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
    2.21 -                    ;;
    2.22 -                * )
    2.23 -                    SOURCES="$SOURCES $srcdir/src/hidapi/linux/hid.c"
    2.24 -                    ;;
    2.25 -                esac
    2.26 +                SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
    2.27              fi
    2.28          fi
    2.29