Skip to content

Commit 670df6b

Browse files
committed
Update SDL2 and SDL3 libraries and project files
- Updated project files for `Hexa.NET.SDL2` and `Hexa.NET.SDL3`. - Updated binary files for SDL2 and SDL3 libraries.
1 parent 3ea8b67 commit 670df6b

Some content is hidden

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

49 files changed

+329
-843
lines changed

Generator/Generator.csproj

Lines changed: 12 additions & 546 deletions
Large diffs are not rendered by default.

Generator/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
}
4040

4141
BatchGenerator.Create()
42-
#if false
42+
#if true
4343
// SDL 2
4444
.Setup<CsCodeGenerator>("sdl2/generator.json")
4545
.AddPrePatch(new NamingPatch(["SDL"], NamingPatchOptions.None))

Generator/sdl2/include/SDL_cpuinfo.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ _m_prefetch(void *__P)
115115
#include <lasxintrin.h>
116116
#define __LASX__
117117
#endif
118-
#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H)
118+
#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H) && \
119+
(defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86))
119120
#include <immintrin.h>
120121
#else
121122
#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)

Generator/sdl2/include/SDL_surface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -808,8 +808,8 @@ extern DECLSPEC int SDLCALL SDL_FillRects
808808
*
809809
* This assumes that the source and destination rectangles are the same size.
810810
* If either `srcrect` or `dstrect` are NULL, the entire surface (`src` or
811-
* `dst`) is copied. The final blit rectangles are saved in `srcrect` and
812-
* `dstrect` after all clipping is performed.
811+
* `dst`) is copied. The final blit rectangle is saved in `dstrect` after
812+
* all clipping is performed.
813813
*
814814
* The blit function should not be called on a locked surface.
815815
*

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 4
61+
#define SDL_PATCHLEVEL 6
6262

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

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.10
23+
* Main include header for the SDL library, version 3.2.12
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_events.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,8 @@ typedef struct SDL_MouseWheelEvent
492492
SDL_MouseWheelDirection direction; /**< Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back */
493493
float mouse_x; /**< X coordinate, relative to window */
494494
float mouse_y; /**< Y coordinate, relative to window */
495+
Sint32 integer_x; /**< The amount scrolled horizontally, accumulated to whole scroll "ticks" (added in 3.2.12) */
496+
Sint32 integer_y; /**< The amount scrolled vertically, accumulated to whole scroll "ticks" (added in 3.2.12) */
495497
} SDL_MouseWheelEvent;
496498

497499
/**

Generator/sdl3/include/SDL_gpu.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2467,9 +2467,9 @@ extern SDL_DECLSPEC SDL_GPUShader * SDLCALL SDL_CreateGPUShader(
24672467
* - `SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT`: (Direct3D 12 only)
24682468
* if the texture usage is SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET, clear
24692469
* the texture to a depth of this value. Defaults to zero.
2470-
* - `SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_UINT8`: (Direct3D 12
2470+
* - `SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER`: (Direct3D 12
24712471
* only) if the texture usage is SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET,
2472-
* clear the texture to a stencil of this value. Defaults to zero.
2472+
* clear the texture to a stencil of this Uint8 value. Defaults to zero.
24732473
* - `SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING`: a name that can be displayed
24742474
* in debugging tools.
24752475
*
@@ -2495,13 +2495,13 @@ extern SDL_DECLSPEC SDL_GPUTexture * SDLCALL SDL_CreateGPUTexture(
24952495
SDL_GPUDevice *device,
24962496
const SDL_GPUTextureCreateInfo *createinfo);
24972497

2498-
#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_R_FLOAT "SDL.gpu.texture.create.d3d12.clear.r"
2499-
#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_G_FLOAT "SDL.gpu.texture.create.d3d12.clear.g"
2500-
#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_B_FLOAT "SDL.gpu.texture.create.d3d12.clear.b"
2501-
#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_A_FLOAT "SDL.gpu.texture.create.d3d12.clear.a"
2502-
#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT "SDL.gpu.texture.create.d3d12.clear.depth"
2503-
#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_UINT8 "SDL.gpu.texture.create.d3d12.clear.stencil"
2504-
#define SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING "SDL.gpu.texture.create.name"
2498+
#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_R_FLOAT "SDL.gpu.texture.create.d3d12.clear.r"
2499+
#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_G_FLOAT "SDL.gpu.texture.create.d3d12.clear.g"
2500+
#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_B_FLOAT "SDL.gpu.texture.create.d3d12.clear.b"
2501+
#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_A_FLOAT "SDL.gpu.texture.create.d3d12.clear.a"
2502+
#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT "SDL.gpu.texture.create.d3d12.clear.depth"
2503+
#define SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER "SDL.gpu.texture.create.d3d12.clear.stencil"
2504+
#define SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING "SDL.gpu.texture.create.name"
25052505

25062506
/**
25072507
* Creates a buffer object to be used in graphics or compute workflows.
@@ -3775,7 +3775,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseWindowFromGPUDevice(
37753775
* supported via SDL_WindowSupportsGPUPresentMode /
37763776
* SDL_WindowSupportsGPUSwapchainComposition prior to calling this function.
37773777
*
3778-
* SDL_GPU_PRESENTMODE_VSYNC and SDL_GPU_SWAPCHAINCOMPOSITION_SDR are always
3778+
* SDL_GPU_PRESENTMODE_VSYNC with SDL_GPU_SWAPCHAINCOMPOSITION_SDR are always
37793779
* supported.
37803780
*
37813781
* \param device a GPU context.

Generator/sdl3/include/SDL_hints.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,8 +1074,8 @@ extern "C" {
10741074
*
10751075
* By default, SDL will try all available GPU backends in a reasonable order
10761076
* until it finds one that can work, but this hint allows the app or user to
1077-
* force a specific target, such as "direct3d11" if, say, your hardware
1078-
* supports D3D12 but want to try using D3D11 instead.
1077+
* force a specific target, such as "direct3d12" if, say, your hardware
1078+
* supports Vulkan but you want to try using D3D12 instead.
10791079
*
10801080
* This hint should be set before any GPU functions are called.
10811081
*

Generator/sdl3/include/SDL_render.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,8 +1607,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetRenderViewport(SDL_Renderer *renderer, S
16071607
* Return whether an explicit rectangle was set as the viewport.
16081608
*
16091609
* This is useful if you're saving and restoring the viewport and want to know
1610-
* whether you should restore a specific rectangle or NULL. Note that the
1611-
* viewport is always reset when changing rendering targets.
1610+
* whether you should restore a specific rectangle or NULL.
16121611
*
16131612
* Each render target has its own viewport. This function checks the viewport
16141613
* for the current render target.

0 commit comments

Comments
 (0)