diff --git a/input/input_driver.c b/input/input_driver.c index 8eea99c10f..0c88c6ba70 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -164,6 +164,7 @@ static input_device_driver_t *joypad_drivers[] = { NULL, }; +#ifdef HAVE_HID static hid_driver_t *hid_drivers[] = { #if defined(HAVE_BTSTACK) &btstack_hid, @@ -180,6 +181,7 @@ static hid_driver_t *hid_drivers[] = { &null_hid, NULL, }; +#endif typedef struct turbo_buttons turbo_buttons_t; @@ -1577,6 +1579,7 @@ void input_conv_analog_id_to_bind_id(unsigned idx, unsigned ident, } } +#ifdef HAVE_HID /** * hid_driver_find_handle: * @idx : index of driver to get handle to. @@ -1649,6 +1652,7 @@ const hid_driver_t *input_hid_init_first(void) return NULL; } +#endif static void osk_update_last_codepoint(const char *word) { diff --git a/input/input_driver.h b/input/input_driver.h index dbba226807..f84eb56fdf 100644 --- a/input/input_driver.h +++ b/input/input_driver.h @@ -22,6 +22,10 @@ #include #include +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include @@ -590,6 +594,7 @@ const char *input_joypad_name(const input_device_driver_t *driver, bool input_config_get_bind_idx(unsigned port, unsigned *joy_idx_real); +#ifdef HAVE_HID /** * hid_driver_find_handle: * @index : index of driver to get handle to. @@ -627,6 +632,7 @@ const char* config_get_hid_driver_options(void); const hid_driver_t *input_hid_init_first(void); const void *hid_driver_get_data(void); +#endif /** Line complete callback. * Calls back after return is pressed with the completed line. @@ -717,11 +723,13 @@ extern input_driver_t input_winraw; extern input_driver_t input_wayland; extern input_driver_t input_null; +#ifdef HAVE_HID extern hid_driver_t iohidmanager_hid; extern hid_driver_t btstack_hid; extern hid_driver_t libusb_hid; extern hid_driver_t wiiusb_hid; extern hid_driver_t null_hid; +#endif RETRO_END_DECLS