diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs index bbc7bf8..23f256a 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_gamepad.g.cs @@ -117,12 +117,12 @@ namespace SDL { public SDL_GamepadBindingType input_type; - [NativeTypeName("__AnonymousRecord_SDL_gamepad_L184_C5")] + [NativeTypeName("__AnonymousRecord_SDL_gamepad_L196_C5")] public _input_e__Union input; public SDL_GamepadBindingType output_type; - [NativeTypeName("__AnonymousRecord_SDL_gamepad_L204_C5")] + [NativeTypeName("__AnonymousRecord_SDL_gamepad_L216_C5")] public _output_e__Union output; [StructLayout(LayoutKind.Explicit)] @@ -132,11 +132,11 @@ namespace SDL public int button; [FieldOffset(0)] - [NativeTypeName("__AnonymousRecord_SDL_gamepad_L188_C9")] + [NativeTypeName("__AnonymousRecord_SDL_gamepad_L200_C9")] public _axis_e__Struct axis; [FieldOffset(0)] - [NativeTypeName("__AnonymousRecord_SDL_gamepad_L195_C9")] + [NativeTypeName("__AnonymousRecord_SDL_gamepad_L207_C9")] public _hat_e__Struct hat; public partial struct _axis_e__Struct @@ -163,7 +163,7 @@ namespace SDL public SDL_GamepadButton button; [FieldOffset(0)] - [NativeTypeName("__AnonymousRecord_SDL_gamepad_L208_C9")] + [NativeTypeName("__AnonymousRecord_SDL_gamepad_L220_C9")] public _axis_e__Struct axis; public partial struct _axis_e__Struct diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs index 3dc1a27..a543936 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_joystick.g.cs @@ -56,9 +56,6 @@ namespace SDL public unsafe partial struct SDL_VirtualJoystickDesc { - [NativeTypeName("Uint16")] - public ushort version; - [NativeTypeName("Uint16")] public ushort type; @@ -314,9 +311,6 @@ namespace SDL [NativeTypeName("#define SDL_IPHONE_MAX_GFORCE 5.0")] public const double SDL_IPHONE_MAX_GFORCE = 5.0; - [NativeTypeName("#define SDL_VIRTUAL_JOYSTICK_DESC_VERSION 1")] - public const int SDL_VIRTUAL_JOYSTICK_DESC_VERSION = 1; - [NativeTypeName("#define SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN \"SDL.joystick.cap.mono_led\"")] public static ReadOnlySpan SDL_PROP_JOYSTICK_CAP_MONO_LED_BOOLEAN => "SDL.joystick.cap.mono_led"u8; diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_quit.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_quit.g.cs deleted file mode 100644 index e69de29..0000000 diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs index 4fb3d30..e8dbee0 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_rect.g.cs @@ -67,7 +67,7 @@ namespace SDL { public static SDL_bool SDL_PointInRect([NativeTypeName("const SDL_Point *")] SDL_Point* p, [NativeTypeName("const SDL_Rect *")] SDL_Rect* r) { - return ((p->x >= r->x) && (p->x < (r->x + r->w)) && (p->y >= r->y) && (p->y < (r->y + r->h))) ? (SDL_bool)(1) : (SDL_bool)(0); + return ((p) != null && (r) != null && (p->x >= r->x) && (p->x < (r->x + r->w)) && (p->y >= r->y) && (p->y < (r->y + r->h))) ? (SDL_bool)(1) : (SDL_bool)(0); } public static SDL_bool SDL_RectEmpty([NativeTypeName("const SDL_Rect *")] SDL_Rect* r) @@ -97,7 +97,7 @@ namespace SDL public static SDL_bool SDL_PointInRectFloat([NativeTypeName("const SDL_FPoint *")] SDL_FPoint* p, [NativeTypeName("const SDL_FRect *")] SDL_FRect* r) { - return ((p->x >= r->x) && (p->x < (r->x + r->w)) && (p->y >= r->y) && (p->y < (r->y + r->h))) ? (SDL_bool)(1) : (SDL_bool)(0); + return ((p) != null && (r) != null && (p->x >= r->x) && (p->x < (r->x + r->w)) && (p->y >= r->y) && (p->y < (r->y + r->h))) ? (SDL_bool)(1) : (SDL_bool)(0); } public static SDL_bool SDL_RectEmptyFloat([NativeTypeName("const SDL_FRect *")] SDL_FRect* r) diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.WinRT.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.WinRT.g.cs index 3ceaa67..b275523 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.WinRT.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.WinRT.g.cs @@ -23,7 +23,6 @@ 3. This notice may not be removed or altered from any source distribution. */ -using System; using System.Runtime.InteropServices; using System.Runtime.Versioning; @@ -47,15 +46,10 @@ namespace SDL public static unsafe partial class SDL3 { - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] - [return: NativeTypeName("const wchar_t *")] - [SupportedOSPlatform("Windows")] - public static extern IntPtr SDL_WinRTGetFSPathUNICODE(SDL_WinRT_Path pathType); - - [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_WinRTGetFSPathUTF8", ExactSpelling = true)] + [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "SDL_WinRTGetFSPath", ExactSpelling = true)] [return: NativeTypeName("const char *")] [SupportedOSPlatform("Windows")] - public static extern byte* Unsafe_SDL_WinRTGetFSPathUTF8(SDL_WinRT_Path pathType); + public static extern byte* Unsafe_SDL_WinRTGetFSPath(SDL_WinRT_Path pathType); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("Windows")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs index 441566c..c39bdac 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_system.iOS.g.cs @@ -33,11 +33,11 @@ namespace SDL { [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("iOS")] - public static extern int SDL_iPhoneSetAnimationCallback(SDL_Window* window, int interval, [NativeTypeName("void (*)(void *)")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr callbackParam); + public static extern int SDL_iOSSetAnimationCallback(SDL_Window* window, int interval, [NativeTypeName("void (*)(void *)")] delegate* unmanaged[Cdecl] callback, [NativeTypeName("void*")] IntPtr callbackParam); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("iOS")] - public static extern void SDL_iPhoneSetEventPump(SDL_bool enabled); + public static extern void SDL_iOSSetEventPump(SDL_bool enabled); [DllImport("SDL3", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true)] [SupportedOSPlatform("iOS")] diff --git a/SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs b/SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs index 187c058..aaddc6e 100644 --- a/SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs +++ b/SDL3-CS/SDL3/ClangSharp/SDL_time.g.cs @@ -49,14 +49,14 @@ namespace SDL public int utc_offset; } - public enum SDL_DATE_FORMAT + public enum SDL_DateFormat { SDL_DATE_FORMAT_YYYYMMDD = 0, SDL_DATE_FORMAT_DDMMYYYY = 1, SDL_DATE_FORMAT_MMDDYYYY = 2, } - public enum SDL_TIME_FORMAT + public enum SDL_TimeFormat { SDL_TIME_FORMAT_24HR = 0, SDL_TIME_FORMAT_12HR = 1, diff --git a/SDL3-CS/SDL3/SDL_quit.cs b/SDL3-CS/SDL3/SDL_quit.cs deleted file mode 100644 index 4f3d7d4..0000000 --- a/SDL3-CS/SDL3/SDL_quit.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - -namespace SDL -{ - public partial class SDL3 - { - [Macro] - public static unsafe bool SDL_QuitRequested() - { - SDL_PumpEvents(); - return SDL_PeepEvents(null, 0, SDL_eventaction.SDL_PEEKEVENT, SDL_EventType.SDL_EVENT_QUIT, SDL_EventType.SDL_EVENT_QUIT) > 0; - } - } -} diff --git a/SDL3-CS/SDL3/SDL_system.iOS.cs b/SDL3-CS/SDL3/SDL_system.iOS.cs deleted file mode 100644 index c40537b..0000000 --- a/SDL3-CS/SDL3/SDL_system.iOS.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. -// See the LICENCE file in the repository root for full licence text. - -using System; -using System.Runtime.Versioning; - -namespace SDL -{ - public static partial class SDL3 - { - [SupportedOSPlatform("iOS")] - [Macro] - public static unsafe int SDL_iOSSetAnimationCallback(SDL_Window* window, int interval, delegate* unmanaged[Cdecl] callback, IntPtr callbackParam) - => SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam); - - [SupportedOSPlatform("iOS")] - [Macro] - public static void SDL_iOSSetEventPump(SDL_bool enabled) - => SDL_iPhoneSetEventPump(enabled); - } -} diff --git a/SDL3-CS/generate_bindings.py b/SDL3-CS/generate_bindings.py index b5a9835..b405427 100644 --- a/SDL3-CS/generate_bindings.py +++ b/SDL3-CS/generate_bindings.py @@ -112,7 +112,6 @@ headers = [ add("SDL3/SDL_platform.h"), add("SDL3/SDL_power.h"), add("SDL3/SDL_properties.h"), - add("SDL3/SDL_quit.h"), add("SDL3/SDL_rect.h"), add("SDL3/SDL_render.h"), add("SDL3/SDL_revision.h"),