mirror of https://github.com/encounter/SDL.git
Fixed compile warnings on platforms without hidapi support
This commit is contained in:
parent
047b20e3b6
commit
ff913a22f4
|
@ -804,6 +804,7 @@ void HID_API_EXPORT HID_API_CALL hid_free_enumeration(struct hid_device_info *d
|
||||||
|
|
||||||
HID_API_EXPORT hid_device * HID_API_CALL hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number)
|
HID_API_EXPORT hid_device * HID_API_CALL hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number)
|
||||||
{
|
{
|
||||||
|
#if HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND || SDL_LIBUSB_DYNAMIC
|
||||||
hid_device *pDevice = NULL;
|
hid_device *pDevice = NULL;
|
||||||
|
|
||||||
if (hid_init() != 0) {
|
if (hid_init() != 0) {
|
||||||
|
@ -836,11 +837,14 @@ HID_API_EXPORT hid_device * HID_API_CALL hid_open(unsigned short vendor_id, unsi
|
||||||
}
|
}
|
||||||
#endif /* SDL_LIBUSB_DYNAMIC */
|
#endif /* SDL_LIBUSB_DYNAMIC */
|
||||||
|
|
||||||
|
#endif /* HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND || SDL_LIBUSB_DYNAMIC */
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
HID_API_EXPORT hid_device * HID_API_CALL hid_open_path(const char *path, int bExclusive /* = false */)
|
HID_API_EXPORT hid_device * HID_API_CALL hid_open_path(const char *path, int bExclusive /* = false */)
|
||||||
{
|
{
|
||||||
|
#if HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND || SDL_LIBUSB_DYNAMIC
|
||||||
hid_device *pDevice = NULL;
|
hid_device *pDevice = NULL;
|
||||||
|
|
||||||
if (hid_init() != 0) {
|
if (hid_init() != 0) {
|
||||||
|
@ -873,6 +877,8 @@ HID_API_EXPORT hid_device * HID_API_CALL hid_open_path(const char *path, int bEx
|
||||||
}
|
}
|
||||||
#endif /* SDL_LIBUSB_DYNAMIC */
|
#endif /* SDL_LIBUSB_DYNAMIC */
|
||||||
|
|
||||||
|
#endif /* HAVE_PLATFORM_BACKEND || HAVE_DRIVER_BACKEND || SDL_LIBUSB_DYNAMIC */
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue