diff --git a/Makefile.common b/Makefile.common index bc5d1a7c38..3779ff8069 100644 --- a/Makefile.common +++ b/Makefile.common @@ -18,6 +18,10 @@ ifeq ($(HAVE_LIBRETRODB),) HAVE_LIBRETRODB = 1 endif +ifeq ($(HAVE_HID), 1) + DEFINES += -DHAVE_HID +endif + ifeq ($(HAVE_LIBRETRODB), 1) DEFINES += -DHAVE_LIBRETRODB endif @@ -154,7 +158,6 @@ OBJ += frontend/frontend.o \ libretro-common/hash/rhash.o \ audio/audio_driver.o \ input/input_driver.o \ - input/input_hid_driver.o \ gfx/video_coord_array.o \ gfx/video_driver.o \ camera/camera_driver.o \ @@ -206,7 +209,6 @@ OBJ += frontend/frontend.o \ input/drivers/nullinput.o \ input/drivers_hid/null_hid.o \ input/drivers_joypad/null_joypad.o \ - input/drivers_joypad/hid_joypad.o \ playlist.o \ movie.o \ record/record_driver.o \ @@ -595,19 +597,21 @@ endif ifeq ($(HAVE_LIBUSB), 1) ifeq ($(HAVE_THREADS), 1) +ifeq ($(HAVE_HID), 1) DEFINES += -DHAVE_LIBUSB OBJ += input/drivers_hid/libusb_hid.o LIBS += -lusb-1.0 - HAVE_HID = 1 +endif endif endif ifeq ($(HAVE_IOHIDMANAGER), 1) +ifeq ($(HAVE_HID), 1) DEFINES += -DHAVE_IOHIDMANAGER OBJ += input/drivers_hid/iohidmanager_hid.o - HAVE_HID = 1 LIBS += -framework IOKit endif +endif ifeq ($(HAVE_CORELOCATION), 1) DEFINES += -DHAVE_CORELOCATION @@ -616,7 +620,9 @@ endif ifeq ($(HAVE_HID), 1) DEFINES += -DHAVE_HID - OBJ += input/connect/joypad_connection.o \ + OBJ += input/input_hid_driver.o \ + input/drivers_joypad/hid_joypad.o \ + input/connect/joypad_connection.o \ input/connect/connect_ps2adapter.o \ input/connect/connect_ps3.o \ input/connect/connect_ps4.o \ diff --git a/griffin/griffin.c b/griffin/griffin.c index 2c0727da27..f7c3dcc143 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -442,6 +442,7 @@ INPUT (HID) ============================================================ */ #include "../input/drivers_joypad/hid_joypad.c" +#ifdef HAVE_HID #include "../input/drivers_hid/null_hid.c" #if defined(HAVE_LIBUSB) && defined(HAVE_THREADS) @@ -460,7 +461,6 @@ INPUT (HID) #include "../input/drivers_hid/wiiusb_hid.c" #endif -#ifdef HAVE_HID #include "../input/connect/joypad_connection.c" #include "../input/connect/connect_ps3.c" #include "../input/connect/connect_ps4.c" diff --git a/input/input_joypad_driver.c b/input/input_joypad_driver.c index 5f699e8019..5c733cbc66 100644 --- a/input/input_joypad_driver.c +++ b/input/input_joypad_driver.c @@ -68,7 +68,9 @@ static input_device_driver_t *joypad_drivers[] = { #ifdef HAVE_MFI &mfi_joypad, #endif +#ifdef HAVE_HID &hid_joypad, +#endif &null_joypad, NULL, }; diff --git a/list_special.c b/list_special.c index 2f1064d81e..60cd0a8ff4 100644 --- a/list_special.c +++ b/list_special.c @@ -202,6 +202,7 @@ struct string_list *string_list_new_special(enum string_list_type type, } break; case STRING_LIST_INPUT_HID_DRIVERS: +#ifdef HAVE_HID for (i = 0; hid_driver_find_handle(i); i++) { const char *opt = hid_driver_find_ident(i); @@ -209,6 +210,7 @@ struct string_list *string_list_new_special(enum string_list_type type, string_list_append(s, opt, attr); } +#endif break; case STRING_LIST_INPUT_JOYPAD_DRIVERS: for (i = 0; joypad_driver_find_handle(i); i++) diff --git a/qb/config.params.sh b/qb/config.params.sh index 187b05fe71..4a8eba10a2 100644 --- a/qb/config.params.sh +++ b/qb/config.params.sh @@ -82,3 +82,4 @@ HAVE_RPNG=yes # RPNG support HAVE_RBMP=yes # RBMP support HAVE_RJPEG=yes # RJPEG support HAVE_RTGA=yes # RTGA support +HAVE_HID=yes # Low-level HID (Human Interface Device) support