mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-21 10:11:18 +00:00
Make HAVE_HID completely optional
This commit is contained in:
parent
d5db2a940a
commit
d44062d841
@ -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 \
|
||||
|
@ -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"
|
||||
|
@ -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,
|
||||
};
|
||||
|
@ -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++)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user