From 8624db0eaea7ab0225ead7ec3b580431d3659157 Mon Sep 17 00:00:00 2001 From: Susko3 Date: Sat, 6 Apr 2024 14:07:38 +0200 Subject: [PATCH] Add `void *` overload for `SDL_free()` Useful as any pointer type can implicitly covert to void *. --- SDL3-CS/SDL3/SDL_stdinc.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SDL3-CS/SDL3/SDL_stdinc.cs b/SDL3-CS/SDL3/SDL_stdinc.cs index 67084b2..ca0fe5d 100644 --- a/SDL3-CS/SDL3/SDL_stdinc.cs +++ b/SDL3-CS/SDL3/SDL_stdinc.cs @@ -19,5 +19,7 @@ namespace SDL { [Macro] public static uint SDL_FOURCC(byte A, byte B, byte C, byte D) => (uint)((A << 0) | (B << 8) | (C << 16) | (D << 24)); + + public static unsafe void SDL_free(void* mem) => SDL_free((IntPtr)mem); } }