Commit Graph

14 Commits

Author SHA1 Message Date
Susko3 2c185bf63b Fix SDL_mixer function prefix 2025-12-13 03:09:51 +01:00
MINI\jairo c7b853e9ce Handle Mix_ methods 2025-06-28 22:37:36 -05:00
Susko3 88efab5deb Fix `Unsafe_` method generation in SDL_ttf 2025-06-24 11:00:53 +02:00
Dan Balasescu b3dec6b80c
Refactor source generator a bit 2024-12-09 10:51:26 +09:00
WizzardMaker 52c2c1b31e split up sdl libraries into separate projects 2024-12-03 15:44:40 +01:00
WizzardMaker 1e78619716 updated c# source generator to also take other SDL methods into account 2024-12-03 15:44:40 +01:00
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