From cef2e24326d9d350e2db2783deac9b6d56490120 Mon Sep 17 00:00:00 2001 From: Susko3 Date: Sat, 6 Apr 2024 01:34:10 +0200 Subject: [PATCH] Fix duplicate `XEvent` struct definitions --- SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs | 5 ----- SDL3-CS/SDL3/ClangSharp/SDL_system.WinRT.g.cs | 5 ----- SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs | 5 ----- SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs | 8 ++------ SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs | 5 ----- SDL3-CS/SDL3/SDL_system.rsp | 10 ++++++++++ 6 files changed, 12 insertions(+), 26 deletions(-) create mode 100644 SDL3-CS/SDL3/SDL_system.rsp diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs index b28f7a1..a59ad8e 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.Android.g.cs @@ -28,11 +28,6 @@ using System.Runtime.Versioning; namespace SDL { - [StructLayout(LayoutKind.Explicit)] - public partial struct _XEvent - { - } - public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.WinRT.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.WinRT.g.cs index 1d1e376..70842c3 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.WinRT.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.WinRT.g.cs @@ -28,11 +28,6 @@ using System.Runtime.Versioning; namespace SDL { - [StructLayout(LayoutKind.Explicit)] - public partial struct _XEvent - { - } - public enum SDL_WinRT_Path { SDL_WINRT_PATH_INSTALLED_LOCATION, diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs index 4808a2a..46b36af 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.Windows.g.cs @@ -32,11 +32,6 @@ namespace SDL { } - [StructLayout(LayoutKind.Explicit)] - public partial struct _XEvent - { - } - public partial struct XTaskQueueObject { } diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs index c16946f..6664394 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.g.cs @@ -23,19 +23,15 @@ 3. This notice may not be removed or altered from any source distribution. */ +using System; using System.Runtime.InteropServices; namespace SDL { - [StructLayout(LayoutKind.Explicit)] - public partial struct _XEvent - { - } - public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - public static extern void SDL_SetX11EventHook([NativeTypeName("SDL_X11EventHook")] delegate* unmanaged[Cdecl] callback, void* userdata); + public static extern void SDL_SetX11EventHook([NativeTypeName("SDL_X11EventHook")] delegate* unmanaged[Cdecl] callback, void* userdata); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [return: NativeTypeName("SDL_bool")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs index f031f25..3d9f7f5 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs @@ -28,11 +28,6 @@ using System.Runtime.Versioning; namespace SDL { - [StructLayout(LayoutKind.Explicit)] - public partial struct _XEvent - { - } - public static unsafe partial class SDL3 { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] diff --git a/SDL3-CS/SDL3/SDL_system.rsp b/SDL3-CS/SDL3/SDL_system.rsp new file mode 100644 index 0000000..7dee284 --- /dev/null +++ b/SDL3-CS/SDL3/SDL_system.rsp @@ -0,0 +1,10 @@ +# Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +# See the LICENCE file in the repository root for full licence text. + +# Exclude struct forward declaration +--exclude +_XEvent + +# Remap removed struct pointer to generic pointer +--remap +_XEvent*=IntPtr