usb: Fix Xbox patch to use configurable num_ports field

This commit is contained in:
Matt Borgerson 2020-02-17 23:46:26 -07:00
parent 4009d69e8d
commit f6efba6a89
1 changed files with 1 additions and 1 deletions

View File

@ -545,7 +545,7 @@ static void usb_hub_handle_data(USBDevice *dev, USBPacket *p)
status |= (1 << (i + 1));
}
if (status != 0) {
n = DIV_ROUND_UP(NUM_PORTS + 1, 8);
n = DIV_ROUND_UP(s->num_ports + 1, 8);
if (p->iov.size == 1) { /* FreeBSD workaround */
n = 1;
} else if (n > p->iov.size) {