diff --git a/pcsx2/USB/USB.cpp b/pcsx2/USB/USB.cpp index 9444249dc0..f8a56a0eae 100644 --- a/pcsx2/USB/USB.cpp +++ b/pcsx2/USB/USB.cpp @@ -78,16 +78,6 @@ Config::Config(): Log(0) memset(&WheelType, 0, sizeof(WheelType)); } -void __Log(const char *fmt, ...) { - va_list list; - - if (!conf.Log ||!usbLog) return; - - va_start(list, fmt); - vfprintf(usbLog, fmt, list); - va_end(list); -} - //Simpler to reset and reattach after USBclose/USBopen void Reset() { diff --git a/pcsx2/USB/configuration.cpp b/pcsx2/USB/configuration.cpp index e58102b770..a5f706d36e 100644 --- a/pcsx2/USB/configuration.cpp +++ b/pcsx2/USB/configuration.cpp @@ -35,9 +35,9 @@ std::string GetSelectedAPI(const std::pair& pair) bool LoadSettingValue(const TSTDSTRING& ini, const TSTDSTRING& section, const TCHAR* param, TSTDSTRING& value) { CIniKey *key; - auto sect = ciniFile.GetSection(section); - if (sect && (key = sect->GetKey(param))) { - value = key->GetValue(); + auto sect = ciniFile.GetSection(str_to_wstr(section)); + if (sect && (key = sect->GetKey(str_to_wstr(param)))) { + value = wstr_to_str(key->GetValue()); return true; } return false; @@ -46,8 +46,8 @@ bool LoadSettingValue(const TSTDSTRING& ini, const TSTDSTRING& section, const TC bool LoadSettingValue(const TSTDSTRING& ini, const TSTDSTRING& section, const TCHAR* param, int32_t& value) { CIniKey *key; - auto sect = ciniFile.GetSection(section); - if (sect && (key = sect->GetKey(param))) { + auto sect = ciniFile.GetSection(str_to_wstr(section)); + if (sect && (key = sect->GetKey(str_to_wstr(param)))) { try { value = std::stoi(key->GetValue()); return true; @@ -61,19 +61,19 @@ bool LoadSettingValue(const TSTDSTRING& ini, const TSTDSTRING& section, const TC bool SaveSettingValue(const TSTDSTRING& ini, const TSTDSTRING& section, const TCHAR* param, const TSTDSTRING& value) { - ciniFile.SetKeyValue(section, param, value); + ciniFile.SetKeyValue(str_to_wstr(section), str_to_wstr(param), str_to_wstr(value)); return true; } bool SaveSettingValue(const TSTDSTRING& ini, const TSTDSTRING& section, const TCHAR* param, int32_t value) { - ciniFile.SetKeyValue(section, param, TSTDTOSTRING(value)); + ciniFile.SetKeyValue(str_to_wstr(section), str_to_wstr(param), str_to_wstr(TSTDTOSTRING(value))); return true; } void SaveConfig() { - SaveSetting(_T("MAIN"), _T("log"), conf.Log); + SaveSetting("MAIN", "log", conf.Log); SaveSetting(nullptr, 0, N_DEVICE_PORT, N_DEVICE, conf.Port[0]); SaveSetting(nullptr, 1, N_DEVICE_PORT, N_DEVICE, conf.Port[1]); @@ -86,15 +86,15 @@ void SaveConfig() { SaveSetting(nullptr, k.first.first, k.first.second, N_DEVICE_API, k.second); } - bool ret = ciniFile.Save(IniPath); + ciniFile.Save(str_to_wstr(IniPath)); OSDebugOut(_T("ciniFile.Save: %d [%s]\n"), ret, IniPath.c_str()); } void LoadConfig() { std::cerr << "USB load config\n" << std::endl; - ciniFile.Load(IniPath); + ciniFile.Load(str_to_wstr(IniPath)); - LoadSetting(_T("MAIN"), _T("log"), conf.Log); + LoadSetting("MAIN", "log", conf.Log); LoadSetting(nullptr, 0, N_DEVICE_PORT, N_DEVICE, conf.Port[0]); LoadSetting(nullptr, 1, N_DEVICE_PORT, N_DEVICE, conf.Port[1]); @@ -133,7 +133,7 @@ void LoadConfig() { void ClearSection(const TCHAR* section) { - auto s = ciniFile.GetSection(section); + auto s = ciniFile.GetSection(str_to_wstr(section)); if (s) { s->RemoveAllKeys(); } diff --git a/pcsx2/USB/qemu-usb/core.cpp b/pcsx2/USB/qemu-usb/core.cpp index 495a7eb32c..07fb235c65 100644 --- a/pcsx2/USB/qemu-usb/core.cpp +++ b/pcsx2/USB/qemu-usb/core.cpp @@ -23,7 +23,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -#include "osdebugout.h" +#include "../osdebugout.h" +#include "../platcompat.h" #include "vl.h" #include "iov.h" //#include "trace.h" @@ -39,7 +40,7 @@ void usb_pick_speed(USBPort *port) USBDevice *udev = port->dev; int i; - for (i = 0; i < ARRAY_SIZE(speeds); i++) { + for (i = 0; i < (int)ARRAY_SIZE(speeds); i++) { if ((udev->speedmask & (1 << speeds[i])) && (port->speedmask & (1 << speeds[i]))) { udev->speed = speeds[i]; @@ -138,7 +139,7 @@ static void do_token_setup(USBDevice *s, USBPacket *p) s->setup_index = 0; p->actual_length = 0; s->setup_len = (s->setup_buf[7] << 8) | s->setup_buf[6]; - if (s->setup_len > sizeof(s->data_buf)) { + if (s->setup_len > (int32_t)sizeof(s->data_buf)) { fprintf(stderr, "usb_generic_handle_packet: ctrl buffer too small (%d > %zu)\n", s->setup_len, sizeof(s->data_buf)); @@ -200,7 +201,7 @@ static void do_token_in(USBDevice *s, USBPacket *p) case SETUP_STATE_DATA: if (s->setup_buf[0] & USB_DIR_IN) { int len = s->setup_len - s->setup_index; - if (len > p->iov.size) { + if ((size_t)len > p->iov.size) { len = p->iov.size; } usb_packet_copy(p, s->data_buf + s->setup_index, len); @@ -236,7 +237,7 @@ static void do_token_out(USBDevice *s, USBPacket *p) case SETUP_STATE_DATA: if (!(s->setup_buf[0] & USB_DIR_IN)) { int len = s->setup_len - s->setup_index; - if (len > p->iov.size) { + if ((size_t)len > p->iov.size) { len = p->iov.size; } usb_packet_copy(p, s->data_buf + s->setup_index, len); @@ -271,7 +272,7 @@ static void do_parameter(USBDevice *s, USBPacket *p) value = (s->setup_buf[3] << 8) | s->setup_buf[2]; index = (s->setup_buf[5] << 8) | s->setup_buf[4]; - if (s->setup_len > sizeof(s->data_buf)) { + if (s->setup_len > (int32_t)sizeof(s->data_buf)) { fprintf(stderr, "usb_generic_handle_packet: ctrl buffer too small (%d > %zu)\n", s->setup_len, sizeof(s->data_buf)); @@ -450,7 +451,7 @@ void usb_packet_complete_one(USBDevice *dev, USBPacket *p) assert(p->status != USB_RET_ASYNC && p->status != USB_RET_NAK); if (p->status != USB_RET_SUCCESS || - (p->short_not_ok && (p->actual_length < p->iov.size))) { + (p->short_not_ok && ((size_t)p->actual_length < p->iov.size))) { ep->halted = true; } usb_packet_set_state(p, USB_PACKET_COMPLETE); @@ -527,14 +528,9 @@ static const char *usb_packet_state_name(USBPacketState state) void usb_packet_check_state(USBPacket *p, USBPacketState expected) { - USBDevice *dev; - USBBus *bus; - if (p->state == expected) { return; } - dev = p->ep->dev; - bus = dev->bus; //usb_bus_from_device(dev); //trace_usb_packet_state_fault(bus->busnr, dev->port->path, p->ep->nr, p, // usb_packet_state_name(p->state), // usb_packet_state_name(expected)); diff --git a/pcsx2/USB/qemu-usb/desc.cpp b/pcsx2/USB/qemu-usb/desc.cpp index 07e612f215..5cb346b9b2 100644 --- a/pcsx2/USB/qemu-usb/desc.cpp +++ b/pcsx2/USB/qemu-usb/desc.cpp @@ -1,7 +1,7 @@ #include "vl.h" #include "desc.h" #include "glib.h" -#include "osdebugout.h" +#include "../osdebugout.h" //#include "trace.h" /* ------------------------------------------------------------------ */ @@ -128,7 +128,6 @@ int usb_desc_iface_group(const USBDescIfaceAssoc& iad, int flags, uint8_t *dest, size_t len) { int pos = 0; - int i = 0; /* handle interface association descriptor */ uint8_t bLength = 0x08; @@ -209,7 +208,7 @@ int usb_desc_endpoint(const USBDescEndpoint& ep, int flags, uint8_t superlen = (flags & USB_DESC_FLAG_SUPER) ? 0x06 : 0; USBDescriptor *d = (USBDescriptor *)dest; - if (len < bLength + extralen + superlen) { + if (len < (size_t)(bLength + extralen + superlen)) { return -1; } @@ -251,7 +250,7 @@ int usb_desc_other(const USBDescOther& desc, uint8_t *dest, size_t len) { int bLength = desc.length ? desc.length : desc.data[0]; - if (len < bLength) { + if (len < (size_t)bLength) { return -1; } @@ -389,7 +388,6 @@ int usb_desc_parse_config (const uint8_t *data, int len, USBDescDevice& dev) { int pos = 0; USBDescIface *iface = nullptr; - USBDescIfaceAssoc *ifaceAssoc = nullptr; USBDescConfig *config = nullptr; USBDescriptor *d; @@ -668,7 +666,7 @@ int usb_desc_string(USBDevice *dev, int index, uint8_t *dest, size_t len) dest[0] = bLength; dest[1] = USB_DT_STRING; i = 0; pos = 2; - while (pos+1 < bLength && pos+1 < len) { + while (pos+1 < bLength && (size_t)(pos+1) < len) { dest[pos++] = str[i++]; dest[pos++] = 0; } @@ -744,7 +742,7 @@ int usb_desc_get_descriptor(USBDevice *dev, USBPacket *p, } if (ret > 0) { - if (ret > len) { + if ((size_t)ret > len) { ret = len; } memcpy(dest, buf, ret); @@ -757,11 +755,9 @@ int usb_desc_get_descriptor(USBDevice *dev, USBPacket *p, int usb_desc_handle_control(USBDevice *dev, USBPacket *p, int request, int value, int index, int length, uint8_t *data) { - bool msos = (dev->flags & (1 << USB_DEV_FLAG_MSOS_DESC_IN_USE)); - const USBDesc *desc = usb_device_get_usb_desc(dev); + assert(usb_device_get_usb_desc(dev) != NULL); int ret = -1; - assert(desc != NULL); switch(request) { case DeviceOutRequest | USB_REQ_SET_ADDRESS: dev->addr = value; diff --git a/pcsx2/USB/qemu-usb/glib.h b/pcsx2/USB/qemu-usb/glib.h index 02c207f39f..8130422ab0 100644 --- a/pcsx2/USB/qemu-usb/glib.h +++ b/pcsx2/USB/qemu-usb/glib.h @@ -2,7 +2,12 @@ #define GLIB_H #include #include -#include "gmem-size.h" + +#ifdef __M_X86_64 +#define G_MAXSIZE G_MAXUINT64 +#else +#define G_MAXSIZE G_MAXUINT32 +#endif #define G_MAXUINT64 0xffffffffffffffffUL #define G_MAXUINT32 ((uint32_t)0xffffffff) @@ -28,4 +33,4 @@ void* my_g_realloc_n (void* mem, #define my_g_new(struct_type, n_structs) my_G_NEW (struct_type, n_structs, malloc) #define my_g_renew(struct_type, mem, n_structs) my_G_RENEW (struct_type, mem, n_structs, realloc) -#endif \ No newline at end of file +#endif diff --git a/pcsx2/USB/qemu-usb/hid.cpp b/pcsx2/USB/qemu-usb/hid.cpp index 78f0c8a0f5..7b7ef9f884 100644 --- a/pcsx2/USB/qemu-usb/hid.cpp +++ b/pcsx2/USB/qemu-usb/hid.cpp @@ -24,7 +24,7 @@ */ #include "hid.h" #include "input-keymap.h" -#include "osdebugout.h" +#include "../osdebugout.h" #define HID_USAGE_ERROR_ROLLOVER 0x01 #define HID_USAGE_POSTFAIL 0x02 @@ -283,6 +283,7 @@ static void hid_keyboard_process_keycode(HIDState *hs) } /* fall through to process Ctrl_L */ //case 0xe1 ... 0xe7: + [[fallthrough]]; case 0xe1: case 0xe2: case 0xe3: @@ -341,7 +342,7 @@ static void hid_keyboard_process_keycode(HIDState *hs) } } if (i < 0) { - if (hs->kbd.keys < sizeof(hs->kbd.key)) { + if (hs->kbd.keys < (int32_t)sizeof(hs->kbd.key)) { hs->kbd.key[hs->kbd.keys++] = hid_code; } } diff --git a/pcsx2/USB/qemu-usb/iov.cpp b/pcsx2/USB/qemu-usb/iov.cpp index 6d343425eb..122bc20660 100644 --- a/pcsx2/USB/qemu-usb/iov.cpp +++ b/pcsx2/USB/qemu-usb/iov.cpp @@ -379,12 +379,10 @@ size_t iov_discard_back(struct iovec *iov, unsigned int *iov_cnt, void qemu_iovec_discard_back(QEMUIOVector *qiov, size_t bytes) { - size_t total; unsigned int niov = qiov->niov; assert(qiov->size >= bytes); - total = iov_discard_back(qiov->iov, &niov, bytes); - assert(total == bytes); + assert(iov_discard_back(qiov->iov, &niov, bytes) == bytes); qiov->niov = niov; qiov->size -= bytes; diff --git a/pcsx2/USB/shared/inifile.h b/pcsx2/USB/shared/inifile.h index 80dc74cfd1..f99b9f634a 100644 --- a/pcsx2/USB/shared/inifile.h +++ b/pcsx2/USB/shared/inifile.h @@ -537,5 +537,9 @@ typedef KeyIndexA KeyIndex; typedef SecIndexA SecIndex; #endif + +std::wstring str_to_wstr(const std::string& arg); +std::string wstr_to_str(const std::wstring& arg); + #endif diff --git a/pcsx2/USB/shared/ringbuffer.cpp b/pcsx2/USB/shared/ringbuffer.cpp index 87662e78b4..1eb34e90c7 100644 --- a/pcsx2/USB/shared/ringbuffer.cpp +++ b/pcsx2/USB/shared/ringbuffer.cpp @@ -1,7 +1,7 @@ #include "ringbuffer.h" #include #include -#include "osdebugout.h" +#include "../osdebugout.h" #if 0 #define DPRINTF OSDebugOut @@ -152,8 +152,6 @@ size_t RingBuffer::peek_read() const void RingBuffer::write(size_t bytes) { - size_t before = m_end; - //assert( bytes <= m_capacity - size() ); // push m_begin forward if m_end overlaps it @@ -175,7 +173,6 @@ void RingBuffer::read(size_t bytes) { assert( bytes <= size() ); - size_t before = m_begin; m_overrun = false; if ((m_begin < m_end && m_begin + bytes > m_end) || m_begin + bytes > m_end + m_capacity) diff --git a/pcsx2/USB/shared/ringbuffer.h b/pcsx2/USB/shared/ringbuffer.h index e45a4ae9a8..05ebb2bc61 100644 --- a/pcsx2/USB/shared/ringbuffer.h +++ b/pcsx2/USB/shared/ringbuffer.h @@ -74,12 +74,14 @@ public: { return std::chrono::duration_cast(hrc::now()-mLastWrite).count(); } - private: - bool m_overrun; - size_t m_begin, m_end, m_capacity; + size_t m_capacity; char *m_data; + size_t m_begin; + bool m_overrun; + size_t m_end; hrc::time_point mLastWrite = hrc::time_point(ns(0)); + }; #endif diff --git a/pcsx2/USB/usb-eyetoy/usb-eyetoy-webcam.cpp b/pcsx2/USB/usb-eyetoy/usb-eyetoy-webcam.cpp index 038eba0da7..226e44559c 100644 --- a/pcsx2/USB/usb-eyetoy/usb-eyetoy-webcam.cpp +++ b/pcsx2/USB/usb-eyetoy/usb-eyetoy-webcam.cpp @@ -421,9 +421,7 @@ static void eyetoy_handle_data(USBDevice *dev, USBPacket *p) EYETOYState *s = (EYETOYState *)dev; static const int max_ep_size = 896; uint8_t data[max_ep_size]; - int ret = 0; uint8_t devep = p->ep->nr; - size_t len = p->iov.size; switch(p->pid) { case USB_TOKEN_IN: @@ -578,8 +576,6 @@ int EyeToyWebCamDevice::Configure(int port, const std::string& api, void *data) int EyeToyWebCamDevice::Freeze(int mode, USBDevice *dev, void *data) { - EYETOYState *s = (EYETOYState *)dev; - /*switch (mode) { case FREEZE_LOAD: diff --git a/pcsx2/USB/usb-hid/usb-hid.cpp b/pcsx2/USB/usb-hid/usb-hid.cpp index 9d97756ac3..0ddc3ca8df 100644 --- a/pcsx2/USB/usb-hid/usb-hid.cpp +++ b/pcsx2/USB/usb-hid/usb-hid.cpp @@ -26,7 +26,7 @@ #include "hidproxy.h" #include "../qemu-usb/desc.h" #include "usb-hid.h" -#include "osdebugout.h" +#include "../osdebugout.h" #define CONTAINER_OF(p, type, field) ((type*) ((char*)p - ((ptrdiff_t)&((type*)0)->field))) @@ -720,4 +720,4 @@ int HIDMouseDevice::Freeze(int mode, USBDevice *dev, void *data) return HIDKbdDevice::Freeze(mode, dev, data); } -} //namespace \ No newline at end of file +} //namespace diff --git a/pcsx2/USB/usb-mic/usb-headset.cpp b/pcsx2/USB/usb-mic/usb-headset.cpp index 1f4ed7ed0b..39e9aa0e43 100644 --- a/pcsx2/USB/usb-mic/usb-headset.cpp +++ b/pcsx2/USB/usb-mic/usb-headset.cpp @@ -658,7 +658,6 @@ static int usb_audio_ep_control(HeadsetState *s, uint8_t attrib, int length, uint8_t *data) { uint8_t cs = cscn >> 8; - uint8_t cn = cscn - 1; /* -1 for the non-present master control */ uint32_t aid = ATTRIB_ID(cs, attrib, ep); int ret = USB_RET_STALL; @@ -902,7 +901,6 @@ static void headset_handle_data(USBDevice *dev, USBPacket *p) } break; default: - fail: p->status = USB_RET_STALL; break; } @@ -1068,4 +1066,4 @@ int HeadsetDevice::Freeze(int mode, USBDevice *dev, void *data) return -1; } -} \ No newline at end of file +} diff --git a/pcsx2/USB/usb-mic/usb-mic-logitech.cpp b/pcsx2/USB/usb-mic/usb-mic-logitech.cpp index 0683ae0418..56c8c34ec8 100644 --- a/pcsx2/USB/usb-mic/usb-mic-logitech.cpp +++ b/pcsx2/USB/usb-mic/usb-mic-logitech.cpp @@ -235,7 +235,6 @@ USBDevice* LogitechMicDevice::CreateDevice(int port) return nullptr; SINGSTARMICMINIState *s = (SINGSTARMICMINIState *)dev; - const USBDescDevice *full = s->desc.full; s->desc = {}; s->desc_dev = {}; @@ -256,4 +255,4 @@ fail: return nullptr; } -} \ No newline at end of file +} diff --git a/pcsx2/USB/usb-mic/usb-mic-singstar.cpp b/pcsx2/USB/usb-mic/usb-mic-singstar.cpp index e512fe87bf..a2a7d297e2 100644 --- a/pcsx2/USB/usb-mic/usb-mic-singstar.cpp +++ b/pcsx2/USB/usb-mic/usb-mic-singstar.cpp @@ -694,8 +694,8 @@ static void singstar_mic_handle_data(USBDevice *dev, USBPacket *p) case USB_TOKEN_OUT: printf("token out ep: %d\n", devep); OSDebugOut(TEXT("token out ep: %d len: %d\n"), devep, p->actual_length); + [[fallthrough]]; default: - fail: p->status = USB_RET_STALL; break; } @@ -861,4 +861,4 @@ int SingstarDevice::Freeze(int mode, USBDevice *dev, void *data) return -1; } -} \ No newline at end of file +} diff --git a/pcsx2/USB/usb-msd/usb-msd.cpp b/pcsx2/USB/usb-msd/usb-msd.cpp index 925d56b635..0cbe3ed499 100644 --- a/pcsx2/USB/usb-msd/usb-msd.cpp +++ b/pcsx2/USB/usb-msd/usb-msd.cpp @@ -780,7 +780,6 @@ static void usb_msd_handle_control(USBDevice *dev, USBPacket *p, int request, in p->actual_length = 1; break; default: - fail: p->status = USB_RET_STALL; break; } @@ -801,8 +800,6 @@ static void usb_msd_cancel_io(USBDevice *dev, USBPacket *p) static void usb_msd_handle_data(USBDevice *dev, USBPacket *p) { MSDState *s = (MSDState *)dev; - int ret = 0; - size_t file_ret = 0; struct usb_msd_cbw cbw; uint8_t devep = p->ep->nr; @@ -877,7 +874,7 @@ static void usb_msd_handle_data(USBDevice *dev, USBPacket *p) } } } - if (p->actual_length < p->iov.size) { + if ((size_t)p->actual_length < p->iov.size) { DPRINTF("Deferring packet %p [wait data-out]\n", p); s->packet = p; p->status = USB_RET_ASYNC; @@ -955,7 +952,7 @@ static void usb_msd_handle_data(USBDevice *dev, USBPacket *p) } } - if (p->actual_length < p->iov.size) { + if ((size_t)p->actual_length < p->iov.size) { DPRINTF("Deferring packet %p [wait data-in]\n", p); s->packet = p; p->status = USB_RET_ASYNC; @@ -1049,7 +1046,6 @@ const char* MsdDevice::TypeName() int MsdDevice::Freeze(int mode, USBDevice *dev, void *data) { - uint32_t fat32_serial = 0; MSDState *s = (MSDState *)dev; MSDState::freeze *tmp; @@ -1085,4 +1081,4 @@ int MsdDevice::Freeze(int mode, USBDevice *dev, void *data) } #undef DPRINTF -} //namespace \ No newline at end of file +} //namespace diff --git a/pcsx2/USB/usb-pad/usb-pad-ff.cpp b/pcsx2/USB/usb-pad/usb-pad-ff.cpp index 0f534f28a6..0f03749c77 100644 --- a/pcsx2/USB/usb-pad/usb-pad-ff.cpp +++ b/pcsx2/USB/usb-pad/usb-pad-ff.cpp @@ -1,6 +1,6 @@ #include "usb-pad.h" #include "lg/lg_ff.h" -#include "osdebugout.h" +#include "../osdebugout.h" namespace usb_pad { @@ -266,4 +266,4 @@ void Pad::ParseFFData(const ff_data *ffdata, bool isDFP) } } -} //namespace \ No newline at end of file +} //namespace diff --git a/pcsx2/USB/usb-pad/usb-pad.cpp b/pcsx2/USB/usb-pad/usb-pad.cpp index f4ab60b4a6..32b1da474b 100644 --- a/pcsx2/USB/usb-pad/usb-pad.cpp +++ b/pcsx2/USB/usb-pad/usb-pad.cpp @@ -164,7 +164,7 @@ static void pad_handle_data(USBDevice *dev, USBPacket *p) if (devep == 1 && s->pad) { ret = s->pad->TokenIn(data, p->iov.size); if (ret > 0) - usb_packet_copy (p, data, MIN(ret, sizeof(data))); + usb_packet_copy (p, data, MIN(ret, (int)sizeof(data))); else p->status = ret; } else { diff --git a/pcsx2/ps2/Iop/IopHwRead.cpp b/pcsx2/ps2/Iop/IopHwRead.cpp index 492dd1f612..8355b07a52 100644 --- a/pcsx2/ps2/Iop/IopHwRead.cpp +++ b/pcsx2/ps2/Iop/IopHwRead.cpp @@ -22,6 +22,7 @@ #include "FW.h" #include "SPU2/spu2.h" #include "DEV9/DEV9.h" +#include "USB/USB.h" #include "ps2/pgif.h" #include "Mdec.h" diff --git a/pcsx2/ps2/Iop/IopHwWrite.cpp b/pcsx2/ps2/Iop/IopHwWrite.cpp index 79aec19b28..6dd6e6a856 100644 --- a/pcsx2/ps2/Iop/IopHwWrite.cpp +++ b/pcsx2/ps2/Iop/IopHwWrite.cpp @@ -21,6 +21,7 @@ #include "CDVD/CdRom.h" #include "SPU2/spu2.h" #include "DEV9/DEV9.h" +#include "USB/USB.h" #include "ps2/pgif.h" #include "Mdec.h"