Commit Graph

5 Commits

Author SHA1 Message Date
Susko3 7639717186 Change all namespaces to `SDL` (from `SDL3`)
The only real issue with this is Android, as the `SDL3` namespace shadows
the `SDL.SDL3` static class.
2024-04-19 19:02:22 +02:00
Susko3 567e6e4f7c Use Utf8String directly in `fixed` statement 2024-04-17 13:24:23 +02:00
Susko3 439f85de53 Add `Utf8String`, sourcegen and tests 2024-04-16 12:59:17 +02:00
Susko3 95056ef317 Add friendly `string?` overloads to C `(const) char *` functions
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.
2024-04-06 14:36:36 +02:00
Susko3 bad4e097ae Add source generator for `ReadOnlySpan<byte>` overloads of C `const char *` functions 2024-04-06 14:24:33 +02:00