Commit Graph

8 Commits

Author SHA1 Message Date
Susko3 3d1b5059b6 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 7ee4e91d60 Remove SourceGeneration project PackageId
The project is consumed locally by SDL3-CS, it's not meant to be packaged to nuget.
2024-04-19 19:00:28 +02:00
Susko3 8f5e52d944 Update old xmldoc 2024-04-17 13:30:41 +02:00
Susko3 a6838a3f9f Use Utf8String directly in `fixed` statement 2024-04-17 13:24:23 +02:00
Susko3 72a002ead0 Add `Utf8String`, sourcegen and tests 2024-04-16 12:59:17 +02:00
Dan Balasescu 913afa5b4f
Refactorings + auto styling 2024-04-07 12:47:29 +09:00
Susko3 91cef07624 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 c5e3181962 Add source generator for `ReadOnlySpan<byte>` overloads of C `const char *` functions 2024-04-06 14:24:33 +02:00