1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 12:15:49 +00:00
RetroArch/wiiu
gblues 560a5f0a4f Fix the blocking call to HIDRead()
== 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.
2018-01-05 23:12:42 -08:00
..
fs (wiiu) small style nits; declare variables at top; C comments 2018-01-05 13:09:05 +01:00
include Fix the blocking call to HIDRead() 2018-01-05 23:12:42 -08:00
input Fix the blocking call to HIDRead() 2018-01-05 23:12:42 -08:00
system (wiiu) small style nits; declare variables at top; C comments 2018-01-05 13:09:05 +01:00
wut/elf2rpl wiiu: only one dash for gcc -std 2017-10-20 23:43:33 -04:00
frame_shader.c (WIIU) add a frame shader to match the shaders used by the gl/vulkan 2018-01-05 13:18:55 +01:00
frame_shader.h (WIIU) add a frame shader to match the shaders used by the gl/vulkan 2018-01-05 13:18:55 +01:00
gx2_shader_inl.h (WIIU) add a frame shader to match the shaders used by the gl/vulkan 2018-01-05 13:18:55 +01:00
hbl.c [WiiU] Various warning/format string fixes 2017-11-04 20:37:30 +11:00
hbl.h (WiiU) implement the missing requirement for core loading: exec, 2017-01-25 19:52:31 +01:00
link_elf.ld [WiiU] Rewrite exception handler 2017-08-04 21:30:49 +10:00
link_rpl.ld [WiiU] Rewrite exception handler 2017-08-04 21:30:49 +10:00
link.ld (WIIU) misc. 2016-11-02 22:06:15 +01:00
net_listen.sh Simplify, add logging, revert some of the changes 2017-12-30 04:40:23 +01:00
net_send.sh (WiiU) fix wiiload script. 2016-11-10 08:32:45 +01:00
run.sh (WIIU) fix net logger. 2018-01-04 17:21:16 +01:00
shader_utils.c (WIIU) add preliminary multi-pass shader support. 2018-01-06 03:39:53 +01:00
shader_utils.h (WIIU) add a frame shader to match the shaders used by the gl/vulkan 2018-01-05 13:18:55 +01:00
sprite_shader.c (WIIU) add a frame shader to match the shaders used by the gl/vulkan 2018-01-05 13:18:55 +01:00
sprite_shader.h (WIIU) fix net logger. 2018-01-04 17:21:16 +01:00
tex_shader.c (WIIU) add a sprite shader. 2018-01-04 17:38:04 +01:00
tex_shader.h (WIIU) add a sprite shader. 2018-01-04 17:38:04 +01:00
wiiu_dbg.h (WIIU) add a gfd shader file reader. 2018-01-04 23:03:11 +01:00