Commit Graph

113 Commits

Author SHA1 Message Date
Susko3 8d1a377e72 Add recommended remapping for `SDL_hidapi.h` 2024-04-06 12:22:50 +02:00
Susko3 2788460013 Exclude `SDL_main()` from DllImport as it isn't exported by SDL3.dll 2024-04-06 01:59:38 +02:00
Susko3 5cf5bb69d7 Add custom definition for win32 MSG struct
The win32 types are kinda cursed, but it makes it easy to copy&paste and check.
2024-04-06 01:42:45 +02:00
Susko3 a123a3c904 Fix missing <endian.h> when cross-compiling on windows
This works because SDL checks <endian.h> iff SDL_BYTEORDER isn't defined.
6ad390fc50/include/SDL3/SDL_endian.h (L58-L60)
2024-04-06 01:37:05 +02:00
Susko3 b01fa42bff Fix duplicate `XEvent` struct definitions 2024-04-06 01:34:10 +02:00
Susko3 a8553fab6e Add platform specific generation for `SDL_main.h` and `SDL_system.h`
Doesn't compile because of duplicate `_XEvent` definitions.
Linux fails crossgen on Windows due to missing `endian.h`
2024-04-06 01:31:16 +02:00
Susko3 48c9b12f2d Add simple check for generated functions
There are warnings for platform-specific functions.
2024-04-06 01:17:00 +02:00
Susko3 4f065d18f7 Fix errors in `SDL_stdinc.g.cs` with define magic 2024-04-06 01:00:29 +02:00
Susko3 3cff0fd872 Fix errors in `SDL_pixels.g.cs` by specifying enum types 2024-04-06 01:00:29 +02:00
Susko3 5d61c2483e Undefine _WIN32 to generate only platform-agnostic APIs
Probably needs similar undefines on Linux and macOS.

Notice that the signatures of `SDL_CreateThread` and `SDL_CreateThreadWithStackSize`
have changed.
2024-04-06 01:00:29 +02:00
Susko3 61bf25730a Initial SDL3-CS binding project with ClangSharp
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
2024-04-06 00:57:07 +02:00
Susko3 dec67a186e Add global/base files 2024-04-05 23:59:34 +02:00
Dan Balasescu ecfe9e2771 Add README 2024-04-04 03:12:48 +09:00