=== DETAILS
Replaced includes for things that aren't standard library headers so
they use quotes instead of brackets.
Also fixed up a couple of headers that had include-order dependencies.
=== DETAILS
Since @aliaspider wants the `wiiu/` to be something of a mini-SDK, I've
reorganized the code I put in there:
- `wiiu/main.c` now only has the ELF/RPX entrypoints, and the code used
by those entrypoints, with RA code removed (e.g. swapped retro_sleep()
for usleep()). These entrypoints then call main() ...
- Moved `main()` and its support functions back into `frontend/drivers/platform_wiiu.c`
I also renamed some of the support functions I wrote, and better
organized them within the code.
- Moved `wiiu/input/` into the `input/` hierarchy:
* The joypad drivers now live in `input/drivers_joypad/wiiu/`
* The HID driver now lives in `input/drivers_hid/`
* The Wii U specific headers now live in `input/include/wiiu`
* I added `input/include` into the include search path to avoid
using really ugly relative includes
== DETAILS
Thanks to JacobM at GBAtemp for helping me test this.
The WaveBird wasn't being properly picked up due to the port status byte
being different from normal GC controllers. (Why? who knows. Probably
so games could detect the WB and show WB-specific OSDs).
This implementation should be more future-proof, to handle any other
unexpected status bytes.
== DETAILS
- DS3 analog wasn't working mainly because I forgot to actually declare the
axes in input/input_autoconfig.c when declaring the pad. Whoops.
- I also moved the axis decoding logic to a more central place, because it
clearly is not Wii U specific.
- Removed some dead commented-out code
== TESTING
Can use analog inputs on both GCA and DS3. Tested in Mario 3 on Nestopia core.
Haven't tested with any actual analog games, but I did confirm via logging
that the correct ranges are produced.
== DETAILS
So, it turns out that there *is* a autoconfig disconnect handler. Took digging
through tasks/task_autodetect.c to find it!
So, I added a call to the handler when the pad gets disconnected.
This seems to solve the problem of the pad not disappearing from the menu.
(At the very least, the user's pad index reverts to "none" which is still
an improvement)
== TESTING
Tested manually, made sure it didn't crash or leak slots.
This should fix the issue where R/L buttons didn't register when doing
input detection.
This also brings the GC pad in line with the rest of the gamepads in
input_autodetect_builtin.c.
Also fixed a really stupid bug that was part of why analog inputs aren't
being read. Analog still isn't working, mind, but it's a lot closer to
working now that it's actually getting down into the pad driver level!
=== DETAILS
So, the GCA has 2 USB connections; one is the data connection, and the
second is used to drive rumble.
Due to a driver bug, if the second cable wasn't attached, the pads wouldn't
get detected.
I fixed that bug.
== DETAILS
Hooray for conditional compile directives.
Moving things around broke things in unexpected ways on non-WiiU builds.
Well, not *completely* unexpected. But still.
Changes:
- Move some typedefs around to avoid circular include dependencies
- Include the file where the HID driver definition got moved to
== TESTING
- verified build for Wii U still runs successfully
- did a local build without any errors (some weird warnings, but since they
happen in code I didn't change, I'm assuming they're pre-existing?)
== DETAILS
I think this will fix the problem with duplicate pads--pads weren't properly
de-initializing and registering as disconnected. When a pad is disconnected,
the slot should properly release now.