mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
560a5f0a4f
== DETAILS TIL that the "max_packet_size_*" fields in the HIDDevice struct are actually requirements, not maximums. The reason HIDRead() was blocking was because the HIDWrite() that sent the activation command was silently failing. The reason HIDWrite() was silently failing was because I was using too small of a buffer for the device. In this case: the Wii U GC adapter, which has a "max" tx packet size of 5. "max" is misleading. You actually have to write all 5 bytes. Which means: copying the 1-byte buffer to the 5-byte buffer, and writing the 5-byte buffer via HIDWrite(). So, in summary: - Use correct semantics for HIDWrite() so that HIDRead() can work. - Update the OSThread struct to reflect the current knowledge over at WUT. It's unlikely this was actually causing a problem, but never hurts to be more correct. == TESTING I temporarily enabled the call to log_buffer() and confirmed that the GC adapter's state is successfully being read.