From 4ed850c6f3adf3ede9ba4927a276ec669757e62b Mon Sep 17 00:00:00 2001 From: Susko3 Date: Sat, 6 Apr 2024 01:59:38 +0200 Subject: [PATCH] Exclude `SDL_main()` from DllImport as it isn't exported by SDL3.dll --- SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs | 3 --- SDL3-CS/SDL3/ClangSharp/SDL_main.g.cs | 3 --- SDL3-CS/SDL3/SDL_main.rsp | 7 +++++++ 3 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 SDL3-CS/SDL3/SDL_main.rsp diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs index c7cd868..4ae3a7e 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_main.Windows.g.cs @@ -41,8 +41,5 @@ namespace SDL [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("Windows")] public static extern void SDL_GDKSuspendComplete(); - - [NativeTypeName("#define main SDL_main")] - public static readonly delegate* main = &SDL_main; } } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_main.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_main.g.cs index cfa292a..182b503 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_main.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_main.g.cs @@ -29,9 +29,6 @@ namespace SDL { public static unsafe partial class SDL3 { - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern int SDL_main(int argc, [NativeTypeName("char *[]")] sbyte** argv); - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] public static extern void SDL_SetMainReady(); diff --git a/SDL3-CS/SDL3/SDL_main.rsp b/SDL3-CS/SDL3/SDL_main.rsp new file mode 100644 index 0000000..7980895 --- /dev/null +++ b/SDL3-CS/SDL3/SDL_main.rsp @@ -0,0 +1,7 @@ +# Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +# See the LICENCE file in the repository root for full licence text. + +# Exclude definition that are only useful when building C applications. +--exclude +SDL_main +main