Try to fix libusb includes

This commit is contained in:
Megamouse 2026-05-22 07:20:39 +02:00 committed by Elad
parent d8710c431d
commit f63a34dcc2
3 changed files with 4 additions and 7 deletions

View File

@ -44,8 +44,6 @@
#include "Emu/Io/LogitechG27.h" #include "Emu/Io/LogitechG27.h"
#endif #endif
#include <libusb.h>
#ifdef _WIN32 #ifdef _WIN32
#if LIBUSB_WINDOWS_HOTPLUG && LIBUSB_API_VERSION >= 0x0100010C #if LIBUSB_WINDOWS_HOTPLUG && LIBUSB_API_VERSION >= 0x0100010C
#define SYS_USBD_HOTPLUG_SUPPORTED 1 #define SYS_USBD_HOTPLUG_SUPPORTED 1
@ -357,7 +355,7 @@ void usb_handler_thread::perform_scan()
{ {
// look if any device which we could be interested in is actually connected // look if any device which we could be interested in is actually connected
libusb_device** list = nullptr; libusb_device** list = nullptr;
const ssize_t ndev = libusb_get_device_list(ctx, &list); const auto ndev = libusb_get_device_list(ctx, &list);
std::set<uint64_t> seen_usb_devices; std::set<uint64_t> seen_usb_devices;
if (ndev < 0) if (ndev < 0)
@ -366,7 +364,7 @@ void usb_handler_thread::perform_scan()
return; return;
} }
for (ssize_t index = 0; index < ndev; index++) for (auto index = 0; index < ndev; index++)
{ {
libusb_device* dev = list[index]; libusb_device* dev = list[index];
libusb_device_descriptor desc; libusb_device_descriptor desc;

View File

@ -4,7 +4,6 @@
#include "Emu/Cell/lv2/sys_usbd.h" #include "Emu/Cell/lv2/sys_usbd.h"
#include "Emu/Io/usb_device.h" #include "Emu/Io/usb_device.h"
#include "Utilities/StrUtil.h" #include "Utilities/StrUtil.h"
#include <libusb.h>
LOG_CHANNEL(sys_usbd); LOG_CHANNEL(sys_usbd);

View File

@ -1,5 +1,7 @@
#pragma once #pragma once
#include "Emu/Cell/lv2/sys_usbd.h"
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(push, 0) #pragma warning(push, 0)
#else #else
@ -15,8 +17,6 @@
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
#include "Emu/Cell/lv2/sys_usbd.h"
struct UsbTransfer; struct UsbTransfer;
// Usb descriptors // Usb descriptors