From 69a1b065c1ca3a03808bd00700e0762a08d5bc2a Mon Sep 17 00:00:00 2001 From: "specialfred453@gmail.com" Date: Sun, 16 Mar 2025 16:30:30 -0400 Subject: [PATCH] Fixed a bug where a bit of code only needed for the Microphone was causing issues with Halo 2 when the XBLC is connected during startup. I moved it so that it's only used for the XBLC Microphone endpoint and that seems to have resolved the issue --- hw/xbox/xblc.c | 11 +++++------ subprojects/cpp-httplib | 1 + 2 files changed, 6 insertions(+), 6 deletions(-) create mode 160000 subprojects/cpp-httplib diff --git a/hw/xbox/xblc.c b/hw/xbox/xblc.c index 90b741556e..eb7dc51d25 100644 --- a/hw/xbox/xblc.c +++ b/hw/xbox/xblc.c @@ -442,6 +442,11 @@ static void usb_xblc_handle_data(USBDevice *dev, USBPacket *p) to_process -= chunk_len; } + // Ensure we fill the entire packet regardless of if we have audio data so we don't + // cause an underrun error. + if (p->actual_length < p->iov.size) + usb_packet_copy(p, (void *)silence, p->iov.size - p->actual_length); + break; case USB_TOKEN_OUT: // Speaker data - get data from usb packet then push to fifo. @@ -456,12 +461,6 @@ static void usb_xblc_handle_data(USBDevice *dev, USBPacket *p) assert(false); break; } - - // Ensure we fill the entire packet regardless of if we have audio data so we don't - // cause an underrun error. - if (p->actual_length < p->iov.size) - usb_packet_copy(p, (void *)silence, p->iov.size - p->actual_length); - } static void usb_xbox_communicator_unrealize(USBDevice *dev) diff --git a/subprojects/cpp-httplib b/subprojects/cpp-httplib new file mode 160000 index 0000000000..0f1b62c2b3 --- /dev/null +++ b/subprojects/cpp-httplib @@ -0,0 +1 @@ +Subproject commit 0f1b62c2b3d0898cbab7aa685c2593303ffdc1a2