Minor cleanup

This commit is contained in:
Sam Lantinga 2022-04-04 20:46:56 -07:00
parent 6cd444f0fa
commit 7b3449b89f
2 changed files with 4 additions and 5 deletions

View File

@ -1185,9 +1185,9 @@ struct SDL_hid_device_info *SDL_hid_enumerate(unsigned short vendor_id, unsigned
#ifdef SDL_LIBUSB_DYNAMIC #ifdef SDL_LIBUSB_DYNAMIC
if (libusb_ctx.libhandle) { if (libusb_ctx.libhandle) {
usb_devs = LIBUSB_hid_enumerate(vendor_id, product_id); usb_devs = LIBUSB_hid_enumerate(vendor_id, product_id);
#ifdef DEBUG_HIDAPI #ifdef DEBUG_HIDAPI
SDL_Log("libusb devices found:"); SDL_Log("libusb devices found:");
#endif #endif
for (usb_dev = usb_devs; usb_dev; usb_dev = usb_dev->next) { for (usb_dev = usb_devs; usb_dev; usb_dev = usb_dev->next) {
new_dev = (struct SDL_hid_device_info*) SDL_malloc(sizeof(struct SDL_hid_device_info)); new_dev = (struct SDL_hid_device_info*) SDL_malloc(sizeof(struct SDL_hid_device_info));
if (!new_dev) { if (!new_dev) {
@ -1197,11 +1197,11 @@ struct SDL_hid_device_info *SDL_hid_enumerate(unsigned short vendor_id, unsigned
return NULL; return NULL;
} }
CopyHIDDeviceInfo(usb_dev, new_dev); CopyHIDDeviceInfo(usb_dev, new_dev);
#ifdef DEBUG_HIDAPI #ifdef DEBUG_HIDAPI
SDL_Log(" - %ls %ls 0x%.4hx 0x%.4hx", SDL_Log(" - %ls %ls 0x%.4hx 0x%.4hx",
usb_dev->manufacturer_string, usb_dev->product_string, usb_dev->manufacturer_string, usb_dev->product_string,
usb_dev->vendor_id, usb_dev->product_id); usb_dev->vendor_id, usb_dev->product_id);
#endif #endif
if (last != NULL) { if (last != NULL) {
last->next = new_dev; last->next = new_dev;

View File

@ -27,7 +27,6 @@
#endif #endif
#if SDL_VIDEO_DRIVER_ANDROID #if SDL_VIDEO_DRIVER_ANDROID
#include <android/native_window.h> #include <android/native_window.h>
#include "../core/android/SDL_android.h"
#include "../video/android/SDL_androidvideo.h" #include "../video/android/SDL_androidvideo.h"
#endif #endif
#if SDL_VIDEO_DRIVER_RPI #if SDL_VIDEO_DRIVER_RPI