From 9eae0962644d878863230a3ae3b11e0c55325d99 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 23 Jul 2023 14:00:16 +0000 Subject: [PATCH 1/2] Bump ext/SDL from `5782007` to `8adab0b` Bumps [ext/SDL](https://github.com/libsdl-org/SDL) from `5782007` to `8adab0b`. - [Release notes](https://github.com/libsdl-org/SDL/releases) - [Commits](https://github.com/libsdl-org/SDL/compare/57820071a497d57e362f6a7c71ab10c4a6fb5228...8adab0b88ab1c0aa69242fffc48afdba085b1dc4) --- updated-dependencies: - dependency-name: ext/SDL dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- ext/SDL | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/SDL b/ext/SDL index 5782007..8adab0b 160000 --- a/ext/SDL +++ b/ext/SDL @@ -1 +1 @@ -Subproject commit 57820071a497d57e362f6a7c71ab10c4a6fb5228 +Subproject commit 8adab0b88ab1c0aa69242fffc48afdba085b1dc4 From 3cf36b619ae35a51c43bfc3e234392a5de568adf Mon Sep 17 00:00:00 2001 From: lithiumtoast <519592+lithiumtoast@users.noreply.github.com> Date: Sun, 23 Jul 2023 14:09:54 +0000 Subject: [PATCH 2/2] Update C# bindings --- .../SDL/Generated/AssemblyAttributes.gen.cs | 6 +- src/cs/production/SDL/Generated/SDL.gen.cs | 67 ++++++++++++++----- 2 files changed, 54 insertions(+), 19 deletions(-) diff --git a/src/cs/production/SDL/Generated/AssemblyAttributes.gen.cs b/src/cs/production/SDL/Generated/AssemblyAttributes.gen.cs index c67c892..a1178eb 100644 --- a/src/cs/production/SDL/Generated/AssemblyAttributes.gen.cs +++ b/src/cs/production/SDL/Generated/AssemblyAttributes.gen.cs @@ -1,7 +1,7 @@ // To disable generating this file set `isEnabledGenerateAssemblyAttributes` to `false` in the config file for generating C# code. // -// This code was generated by the following tool on 2023-07-17 00:34:13 GMT+00:00: -// https://github.com/bottlenoselabs/c2cs (v6.0.7.0) +// This code was generated by the following tool on 2023-07-23 14:02:59 GMT+00:00: +// https://github.com/bottlenoselabs/c2cs (v6.1.2.0) // // Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. // @@ -11,7 +11,7 @@ #nullable enable #pragma warning disable CS1591 #pragma warning disable CS8981 -global using bottlenoselabs.C2CS.Runtime; +using bottlenoselabs.C2CS.Runtime; using System; using System.Collections.Generic; using System.Globalization; diff --git a/src/cs/production/SDL/Generated/SDL.gen.cs b/src/cs/production/SDL/Generated/SDL.gen.cs index 832d0fb..2e8bf28 100644 --- a/src/cs/production/SDL/Generated/SDL.gen.cs +++ b/src/cs/production/SDL/Generated/SDL.gen.cs @@ -1,7 +1,7 @@ // -// This code was generated by the following tool on 2023-07-17 00:34:13 GMT+00:00: -// https://github.com/bottlenoselabs/c2cs (v6.0.7.0) +// This code was generated by the following tool on 2023-07-23 14:02:59 GMT+00:00: +// https://github.com/bottlenoselabs/c2cs (v6.1.2.0) // // Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. // @@ -11,7 +11,7 @@ #nullable enable #pragma warning disable CS1591 #pragma warning disable CS8981 -global using bottlenoselabs.C2CS.Runtime; +using bottlenoselabs.C2CS.Runtime; using System; using System.Collections.Generic; using System.Globalization; @@ -35,9 +35,13 @@ public static unsafe partial class SDL [DllImport(LibraryName, EntryPoint = "SDL_AddGamepadMapping", CallingConvention = CallingConvention.Cdecl)] public static extern int SDL_AddGamepadMapping(CString mapping); + [CNode(Kind = "Function")] + [DllImport(LibraryName, EntryPoint = "SDL_AddGamepadMappingsFromFile", CallingConvention = CallingConvention.Cdecl)] + public static extern int SDL_AddGamepadMappingsFromFile(CString file); + [CNode(Kind = "Function")] [DllImport(LibraryName, EntryPoint = "SDL_AddGamepadMappingsFromRW", CallingConvention = CallingConvention.Cdecl)] - public static extern int SDL_AddGamepadMappingsFromRW(SDL_RWops* rw, int freerw); + public static extern int SDL_AddGamepadMappingsFromRW(SDL_RWops* src, int freesrc); [CNode(Kind = "Function")] [DllImport(LibraryName, EntryPoint = "SDL_AddHintCallback", CallingConvention = CallingConvention.Cdecl)] @@ -835,6 +839,10 @@ public static unsafe partial class SDL [DllImport(LibraryName, EntryPoint = "SDL_GetGamepadStringForButton", CallingConvention = CallingConvention.Cdecl)] public static extern CString SDL_GetGamepadStringForButton(SDL_GamepadButton button); + [CNode(Kind = "Function")] + [DllImport(LibraryName, EntryPoint = "SDL_GetGamepadStringForType", CallingConvention = CallingConvention.Cdecl)] + public static extern CString SDL_GetGamepadStringForType(SDL_GamepadType type); + [CNode(Kind = "Function")] [DllImport(LibraryName, EntryPoint = "SDL_GetGamepadTouchpadFinger", CallingConvention = CallingConvention.Cdecl)] public static extern int SDL_GetGamepadTouchpadFinger(SDL_Gamepad* gamepad, int touchpad, int finger, byte* state, float* x, float* y, float* pressure); @@ -843,6 +851,10 @@ public static unsafe partial class SDL [DllImport(LibraryName, EntryPoint = "SDL_GetGamepadType", CallingConvention = CallingConvention.Cdecl)] public static extern SDL_GamepadType SDL_GetGamepadType(SDL_Gamepad* gamepad); + [CNode(Kind = "Function")] + [DllImport(LibraryName, EntryPoint = "SDL_GetGamepadTypeFromString", CallingConvention = CallingConvention.Cdecl)] + public static extern SDL_GamepadType SDL_GetGamepadTypeFromString(CString str); + [CNode(Kind = "Function")] [DllImport(LibraryName, EntryPoint = "SDL_GetGamepadVendor", CallingConvention = CallingConvention.Cdecl)] public static extern ushort SDL_GetGamepadVendor(SDL_Gamepad* gamepad); @@ -1143,6 +1155,14 @@ public static unsafe partial class SDL [DllImport(LibraryName, EntryPoint = "SDL_GetRGBA", CallingConvention = CallingConvention.Cdecl)] public static extern void SDL_GetRGBA(uint pixel, SDL_PixelFormat* format, byte* r, byte* g, byte* b, byte* a); + [CNode(Kind = "Function")] + [DllImport(LibraryName, EntryPoint = "SDL_GetRealGamepadInstanceType", CallingConvention = CallingConvention.Cdecl)] + public static extern SDL_GamepadType SDL_GetRealGamepadInstanceType(SDL_JoystickID instance_id); + + [CNode(Kind = "Function")] + [DllImport(LibraryName, EntryPoint = "SDL_GetRealGamepadType", CallingConvention = CallingConvention.Cdecl)] + public static extern SDL_GamepadType SDL_GetRealGamepadType(SDL_Gamepad* gamepad); + [CNode(Kind = "Function")] [DllImport(LibraryName, EntryPoint = "SDL_GetRectAndLineIntersection", CallingConvention = CallingConvention.Cdecl)] public static extern CBool SDL_GetRectAndLineIntersection(SDL_Rect* rect, int* X1, int* Y1, int* X2, int* Y2); @@ -2087,6 +2107,10 @@ public static unsafe partial class SDL [DllImport(LibraryName, EntryPoint = "SDL_RegisterEvents", CallingConvention = CallingConvention.Cdecl)] public static extern uint SDL_RegisterEvents(int numevents); + [CNode(Kind = "Function")] + [DllImport(LibraryName, EntryPoint = "SDL_ReloadGamepadMappings", CallingConvention = CallingConvention.Cdecl)] + public static extern int SDL_ReloadGamepadMappings(); + [CNode(Kind = "Function")] [DllImport(LibraryName, EntryPoint = "SDL_RemoveTimer", CallingConvention = CallingConvention.Cdecl)] public static extern CBool SDL_RemoveTimer(SDL_TimerID id); @@ -3171,6 +3195,10 @@ public static unsafe partial class SDL [DllImport(LibraryName, EntryPoint = "SDL_strndup", CallingConvention = CallingConvention.Cdecl)] public static extern CString SDL_strndup(CString str, ulong maxlen); + [CNode(Kind = "Function")] + [DllImport(LibraryName, EntryPoint = "SDL_strnlen", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong SDL_strnlen(CString str, ulong maxlen); + [CNode(Kind = "Function")] [DllImport(LibraryName, EntryPoint = "SDL_strrchr", CallingConvention = CallingConvention.Cdecl)] public static extern CString SDL_strrchr(CString str, int c); @@ -3299,6 +3327,10 @@ public static unsafe partial class SDL [DllImport(LibraryName, EntryPoint = "SDL_wcsncmp", CallingConvention = CallingConvention.Cdecl)] public static extern int SDL_wcsncmp(CStringWide str1, CStringWide str2, ulong maxlen); + [CNode(Kind = "Function")] + [DllImport(LibraryName, EntryPoint = "SDL_wcsnlen", CallingConvention = CallingConvention.Cdecl)] + public static extern ulong SDL_wcsnlen(CStringWide wstr, ulong maxlen); + [CNode(Kind = "Function")] [DllImport(LibraryName, EntryPoint = "SDL_wcsstr", CallingConvention = CallingConvention.Cdecl)] public static extern CStringWide SDL_wcsstr(CStringWide haystack, CStringWide needle); @@ -5541,9 +5573,10 @@ public enum SDL_EventType : int SDL_EVENT_WINDOW_ICCPROF_CHANGED = 530, SDL_EVENT_WINDOW_DISPLAY_CHANGED = 531, SDL_EVENT_WINDOW_DISPLAY_SCALE_CHANGED = 532, - SDL_EVENT_WINDOW_DESTROYED = 533, + SDL_EVENT_WINDOW_OCCLUDED = 533, + SDL_EVENT_WINDOW_DESTROYED = 534, SDL_EVENT_WINDOW_FIRST = 514, - SDL_EVENT_WINDOW_LAST = 533, + SDL_EVENT_WINDOW_LAST = 534, SDL_EVENT_KEY_DOWN = 768, SDL_EVENT_KEY_UP = 769, SDL_EVENT_TEXT_EDITING = 770, @@ -5725,15 +5758,17 @@ public enum SDL_GamepadButton : int public enum SDL_GamepadType : int { SDL_GAMEPAD_TYPE_UNKNOWN = 0, - SDL_GAMEPAD_TYPE_XBOX360 = 1, - SDL_GAMEPAD_TYPE_XBOXONE = 2, - SDL_GAMEPAD_TYPE_PS3 = 3, - SDL_GAMEPAD_TYPE_PS4 = 4, - SDL_GAMEPAD_TYPE_PS5 = 5, - SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO = 6, - SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT = 7, - SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT = 8, - SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR = 9 + SDL_GAMEPAD_TYPE_STANDARD = 1, + SDL_GAMEPAD_TYPE_XBOX360 = 2, + SDL_GAMEPAD_TYPE_XBOXONE = 3, + SDL_GAMEPAD_TYPE_PS3 = 4, + SDL_GAMEPAD_TYPE_PS4 = 5, + SDL_GAMEPAD_TYPE_PS5 = 6, + SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_PRO = 7, + SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_LEFT = 8, + SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT = 9, + SDL_GAMEPAD_TYPE_NINTENDO_SWITCH_JOYCON_PAIR = 10, + SDL_GAMEPAD_TYPE_MAX = 11 } [CNode(Kind = "Enum")] @@ -6616,6 +6651,7 @@ public enum SDL_WindowFlags : int { SDL_WINDOW_FULLSCREEN = 1, SDL_WINDOW_OPENGL = 2, + SDL_WINDOW_OCCLUDED = 4, SDL_WINDOW_HIDDEN = 8, SDL_WINDOW_BORDERLESS = 16, SDL_WINDOW_RESIZABLE = 32, @@ -8139,4 +8175,3 @@ public struct SDL_realloc_func #endregion } -