== DETAILS
These changes fall into a few broad categories:
1. Explicitly undefine things we want to re-define due to conflicts with
the version of devkitpro we're using
2. Clean up hex format specifiers to use `%lx` or `%lX` when working with
long integers
3. Move variables inside the ifdef they're used in to squelch "unused variable"
messages
4. Add parenthesis to make Wii U shader declarations stop complaining
And then there's a weird "misleading indent" warning that I fixed by just
rewriting a block of code to use a switch statement instead of if-then-else.
These changes work fine on Wii U, but we'll need to keep an eye on CI/CD to see
if other platform builds break.
== DETAILS
- add a `WiiU` IntelliSense configuration for vscode
- rewrite the `net_listen.sh` script in python because the
shell script approach just isn't portable enough and doesn't handle
things like multiple network adapters gracefully at all.
== DETAILS
For local netplay, it's useful to have your IP address easily
available. This commit makes the Information > Network Information
menu display the Wii U's IP address.
Change summary:
- Fix the logging init to be reentrant to avoid socket consumption
- Add implementation of POSIX `getifaddrs()` and `freeifaddrs()`
to `missing_libc_functions.c`
- Remove compiler directives protecting the code paths that call
`getifaddrs()` from being used in Wii U builds
== TESTING
Have tested locally, successfully get IP address information in
the Information > Network Information.
I think this may also fix NAT traversal. Will need to be tested.
== DETAILS
- remove extraneous '+' from a manually applied diff
- fix the net_listen.sh script so it works properly on
Mac OSX
== TESTING
Works locally.
- Did a test build to ensure RA built
- Copied over to my FTPservU sources and ensured no compile issues there
Looks solid. A lot cleaner, too.
@aliaspider
I used the code in `wiiu/` to bootstrap my own WiiU homebrew app; this
PR reflects some changes I needed to make, that might be useful upstream.
1. Clean up filesystem initialization
Filesystem driver initialization was lumped in with filesystem mounting;
and that was a problem in my project, because I needed to be able to remount
the SD card on the fly. So, now it's split up.
I've added a callback object named "hooks" that can be used by consuming
applications to handle filesystem mounting and unmounting. If these hooks are
not provided, then the existing default behavior occurs.
2. Expand socket handling
- add `SO_NONBLOCK` flag for non-blocking socket I/O
- add normal errno defines like `EWOULDBLOCK` `EAGAIN`.
3. Remove RetroArch dependencies
- the exception handler protects usage of version_git with
`#ifdef HAVE_GIT_VERSION` but not the include, so I added that.
It also technically depends on version.h, but I'm not touching that.
It's easy enough to implement and I needed the same functionality. I'm
not sure what the best solution for that dependency is.
- missing_libc_functions.c included features/features_cpu.h which is
a libretro include. This appears to be a stale include though, because
everything compiles and works without it.
- an ifdef referencing the RA "WIIU" define, rather than the devkitpro
"__wiiu__" define
== DETAILS
The broadcast address is a standard part of TCP/IP that is used to
send messages to everyone on the subnet. This patch updates the
logging code to do the following:
1. Derive the broadcast address from the Wii U's own IP address
and subnet mask. These can all be obtained at runtime, which
means we can...
2. Remove the PC_DEVELOPMENT_IP_ADDRESS define from Wii U's
Makefile, because compiling in an IP is no longer needed.
3. Rewrite the net_listen script to listen for broadcast packets
and print them out with timestamps.
Since it's using the broadcast address, the only requirement is
that the PC be on the same network subnet as the Wii U.
Because of the low overhead of UDP, I've made logging on by
default. This will make it a ton easier to get useful bug
reports from users.
=== 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
The Wii U main entrypoints were embedded in the frontend driver,
which isn't a great place for them. Also, the `main()` method was
pretty long and monolithic. Now it's (much) less so.
Changes:
- Refactor out the main entrypoints into their own source files
(`wiiu/main.c` and `wiiu/main.h`)
- Optimize includes in both files, so only the minimum needed to
compile are included.
- The `main()` method is a lot easier to understand now. It's no longer
a confusing mess of ifdefs.
- There's a small amount of changes in the headers for future work, which
is switching kpad_driver to be callback-driven. The only change here is
to import the function that will be used, and define some data types.
Testing:
- Did local builds and confirmed build is successful
- Successfully loaded a core and switched among a few games