The primary purpose of this is to split out the handling of the native
libs. This is a consequence of using ProjectReference, and resolves the
following issues:
1. When compiling for iOS, it really doesn't like multiple files being
included in the same output path. Example: all Windows SDL.dll files
placed as SDL.dll in the output path.
2. Even if (1) was somehow resolved, the iOS build also doesn't like the
linux-specific .so files being included.
3. As a consequence of (1), it's likely that the project already doesn't
work on some configurations. For example, because win-x86 is
specified as the last item, it will likely take precedence over all
other versions.
4. It looks like `RuntimeIdentifier` is not project-transitive, against
my expectations. I really want the project to both select the correct
single native lib for the current platform, and also support
compiling with a RID (`dotnet build -r ...`).
So now we only copy the correct lib to the output path, and don't do it
while packaging (not required).
This helps consumers avoid having to do ugly casts
as was previously done in `SDL_quit.cs`.
It's very important that the underlying type doesn't change
as that might break ABI compat.
This is done by adding a `Unsafe_` prefix to `(const) char *` (C# `byte*`) functions.
I am using `string?` instead of `ReadOnlyMemory<byte>?` because the returned pointer can
get invalidated and cause memory-safety issues.
The returned pointer is automatically freed if the return type is `char *`.
I've checked that the documentation for all functions (except in SDL_stdinc.h)
requires calling `SDL_free()` on the pointer.
All of these get "Function like macro definition records are not supported: [...] Generated bindings may be incomplete."
warnings when running ClangSharp.
Produces a lot of noise about unused remappings (as we're processing a header at a time).
All remappings (except `SDL_JoystickGUID`) have been added.
`SDL_JoystickGUID` is a remapping of a struct, so it's harded to do programatically.
Probably needs similar undefines on Linux and macOS.
Notice that the signatures of `SDL_CreateThread` and `SDL_CreateThreadWithStackSize`
have changed.
The bindings don't yet compile. There are errors in SDL_pixels.g.cs, SDL_stdinc.g.cs and SDL_thread.g.cs,
a bunch of warnings about "Function like macro definition records are not supported",
and a few "Info: Potential missing remapping".
Built on SDL commit:
6ad390fc50