Skip to content

Commit b67bfac

Browse files
committed
Update to SDL 3.2.6 and SDL 2.32.2
1 parent 7292ccb commit b67bfac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2104
-1566
lines changed

Generator/Generator.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="HexaGen" Version="1.1.15-rc25" />
11+
<PackageReference Include="HexaGen" Version="1.1.15-rc30" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

Generator/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@
3939
}
4040

4141
BatchGenerator.Create()
42+
#if true
4243
// SDL 2
4344
.Setup<CsCodeGenerator>("sdl2/generator.json")
4445
.AddPrePatch(new NamingPatch(["SDL"], NamingPatchOptions.None))
4546
.AddPrePatch(new EnumNamePatch())
4647
.Generate(["sdl2/include/main.h"], "../../../../Hexa.NET.SDL2/Generated", filesSdl2)
47-
48+
#endif
4849
// SDL 3
4950
.Setup<CsCodeGenerator>("sdl3/generator.json")
5051
.AddPrePatch(new NamingPatch(["SDL"], NamingPatchOptions.None))

Generator/sdl2/generator.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"GenerateSizeOfStructs": false,
88
"GeneratePlaceholderComments": false,
99
"GenerateMetadata": false,
10+
"UseCustomContext": true,
1011
"ImportType": "FunctionTable",
1112
"IncludeFolders": [
1213
"C:\\VulkanSDK\\1.3.250.0\\Include\\"
@@ -92,4 +93,4 @@
9293
"IgnoredFunctions": [
9394
"SDL_ReportAssertion"
9495
]
95-
}
96+
}

Generator/sdl2/include/SDL_hints.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,6 +1423,27 @@ extern "C" {
14231423
*/
14241424
#define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
14251425

1426+
1427+
/**
1428+
* A variable containing a list of devices and their desired number of haptic
1429+
* (force feedback) enabled axis.
1430+
*
1431+
* The format of the string is a comma separated list of USB VID/PID pairs in
1432+
* hexadecimal form plus the number of desired axes, e.g.
1433+
*
1434+
* `0xAAAA/0xBBBB/1,0xCCCC/0xDDDD/3`
1435+
*
1436+
* This hint supports a "wildcard" device that will set the number of haptic
1437+
* axes on all initialized haptic devices which were not defined explicitly in
1438+
* this hint.
1439+
*
1440+
* `0xFFFF/0xFFFF/1`
1441+
*
1442+
* This hint should be set before a controller is opened. The number of haptic
1443+
* axes won't exceed the number of real axes found on the device.
1444+
*/
1445+
#define SDL_HINT_JOYSTICK_HAPTIC_AXES "SDL_JOYSTICK_HAPTIC_AXES"
1446+
14261447
/**
14271448
* A variable controlling whether joysticks on Linux will always treat 'hat'
14281449
* axis inputs (ABS_HAT0X - ABS_HAT3Y) as 8-way digital hats without checking

Generator/sdl2/include/SDL_keyboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ extern DECLSPEC SDL_Keycode SDLCALL SDL_GetKeyFromName(const char *name);
255255
* On some platforms using this function activates the screen keyboard.
256256
*
257257
* On desktop platforms, SDL_StartTextInput() is implicitly called on SDL
258-
* window creation which will cause events SDL_TextInputEvent and
258+
* video subsystem initialization which will cause SDL_TextInputEvent and
259259
* SDL_TextEditingEvent to begin emitting.
260260
*
261261
* \since This function is available since SDL 2.0.0.

Generator/sdl2/include/SDL_version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ typedef struct SDL_version
5858
*/
5959
#define SDL_MAJOR_VERSION 2
6060
#define SDL_MINOR_VERSION 32
61-
#define SDL_PATCHLEVEL 0
61+
#define SDL_PATCHLEVEL 2
6262

6363
/**
6464
* Macro to determine SDL version program was compiled against.

Generator/sdl2/include/main.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@
7878
#include "SDL_types.h"
7979
#include "SDL_version.h"
8080
#include "SDL_video.h"
81-
#include "SDL_vulkan.h"
81+
#include "SDL_vulkan.h"

Generator/sdl3/generator.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"GenerateSizeOfStructs": false,
88
"GeneratePlaceholderComments": false,
99
"GenerateMetadata": true,
10+
"UseCustomContext": true,
1011
"IncludeFolders": [
1112
"C:\\VulkanSDK\\1.3.250.0\\Include\\"
1213
],

Generator/sdl3/include/SDL.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121

2222
/**
23-
* Main include header for the SDL library, version 3.2.4
23+
* Main include header for the SDL library, version 3.2.6
2424
*
2525
* It is almost always best to include just this one header instead of
2626
* picking out individual headers included here. There are exceptions to

Generator/sdl3/include/SDL_assert.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ extern "C" {
149149
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
150150
#elif defined(_WIN32) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__arm64__) || defined(__aarch64__)) )
151151
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #0xF000\n\t" )
152+
#elif defined(__GNUC__) || defined(__clang__)
153+
#define SDL_TriggerBreakpoint() __builtin_trap() /* older gcc may not support SDL_HAS_BUILTIN(__builtin_trap) above */
152154
#elif defined(__386__) && defined(__WATCOMC__)
153155
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
154156
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)

0 commit comments

Comments
 (0)