Update SDL3 to 3.2.4

This commit is contained in:
2025-02-13 17:59:28 +02:00
parent 50531cd6f0
commit f57759b250
23 changed files with 191 additions and 80 deletions

View File

@@ -20,7 +20,7 @@
*/
/**
* Main include header for the SDL library, version 3.2.0
* Main include header for the SDL library, version 3.2.4
*
* It is almost always best to include just this one header instead of
* picking out individual headers included here. There are exceptions to

View File

@@ -498,7 +498,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_AddAtomicInt(SDL_AtomicInt *a, int v);
*
* ***Note: If you don't know what this macro is for, you shouldn't use it!***
*
* \param a a pointer to an SDL_AtomicInt to increment.
* \param a a pointer to an SDL_AtomicInt to decrement.
* \returns true if the variable reached zero after decrementing, false
* otherwise.
*

View File

@@ -781,7 +781,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsAudioDevicePlayback(SDL_AudioDeviceID dev
* Physical devices can not be paused or unpaused, only logical devices
* created through SDL_OpenAudioDevice() can be.
*
* \param dev a device opened by SDL_OpenAudioDevice().
* \param devid a device opened by SDL_OpenAudioDevice().
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
@@ -792,7 +792,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsAudioDevicePlayback(SDL_AudioDeviceID dev
* \sa SDL_ResumeAudioDevice
* \sa SDL_AudioDevicePaused
*/
extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev);
extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID devid);
/**
* Use this function to unpause audio playback on a specified device.
@@ -809,7 +809,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev);
* Physical devices can not be paused or unpaused, only logical devices
* created through SDL_OpenAudioDevice() can be.
*
* \param dev a device opened by SDL_OpenAudioDevice().
* \param devid a device opened by SDL_OpenAudioDevice().
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
@@ -820,7 +820,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioDevice(SDL_AudioDeviceID dev);
* \sa SDL_AudioDevicePaused
* \sa SDL_PauseAudioDevice
*/
extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioDevice(SDL_AudioDeviceID dev);
extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioDevice(SDL_AudioDeviceID devid);
/**
* Use this function to query if an audio device is paused.
@@ -832,7 +832,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioDevice(SDL_AudioDeviceID dev);
* created through SDL_OpenAudioDevice() can be. Physical and invalid device
* IDs will report themselves as unpaused here.
*
* \param dev a device opened by SDL_OpenAudioDevice().
* \param devid a device opened by SDL_OpenAudioDevice().
* \returns true if device is valid and paused, false otherwise.
*
* \threadsafety It is safe to call this function from any thread.
@@ -842,7 +842,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioDevice(SDL_AudioDeviceID dev);
* \sa SDL_PauseAudioDevice
* \sa SDL_ResumeAudioDevice
*/
extern SDL_DECLSPEC bool SDLCALL SDL_AudioDevicePaused(SDL_AudioDeviceID dev);
extern SDL_DECLSPEC bool SDLCALL SDL_AudioDevicePaused(SDL_AudioDeviceID devid);
/**
* Get the gain of an audio device.
@@ -1583,6 +1583,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioStreamDevice(SDL_AudioStream *str
* previously been paused. Once unpaused, any bound audio streams will begin
* to progress again, and audio can be generated.
*
* Remember, SDL_OpenAudioDeviceStream opens device in a paused state, so this
* function call is required for audio playback to begin on such device.
*
* \param stream the audio stream associated with the audio device to resume.
* \returns true on success or false on failure; call SDL_GetError() for more
* information.

View File

@@ -239,7 +239,7 @@ extern SDL_DECLSPEC SDL_CameraID * SDLCALL SDL_GetCameras(int *count);
* there _is_ a camera until the user has given you permission to check
* through a scary warning popup.
*
* \param devid the camera device instance ID to query.
* \param instance_id the camera device instance ID.
* \param count a pointer filled in with the number of elements in the list,
* may be NULL.
* \returns a NULL terminated array of pointers to SDL_CameraSpec or NULL on
@@ -254,7 +254,7 @@ extern SDL_DECLSPEC SDL_CameraID * SDLCALL SDL_GetCameras(int *count);
* \sa SDL_GetCameras
* \sa SDL_OpenCamera
*/
extern SDL_DECLSPEC SDL_CameraSpec ** SDLCALL SDL_GetCameraSupportedFormats(SDL_CameraID devid, int *count);
extern SDL_DECLSPEC SDL_CameraSpec ** SDLCALL SDL_GetCameraSupportedFormats(SDL_CameraID instance_id, int *count);
/**
* Get the human-readable device name for a camera.

View File

@@ -130,7 +130,8 @@
* It is optimal for apps to pre-compile the shader formats they might use,
* but for ease of use SDL provides a separate project,
* [SDL_shadercross](https://github.com/libsdl-org/SDL_shadercross)
* , for performing runtime shader cross-compilation.
* , for performing runtime shader cross-compilation. It also has a CLI
* interface for offline precompilation as well.
*
* This is an extremely quick overview that leaves out several important
* details. Already, though, one can see that GPU programming can be quite
@@ -888,6 +889,10 @@ typedef enum SDL_GPUCubeMapFace
* Unlike textures, READ | WRITE can be used for simultaneous read-write
* usage. The same data synchronization concerns as textures apply.
*
* If you use a STORAGE flag, the data in the buffer must respect std140
* layout conventions. In practical terms this means you must ensure that vec3
* and vec4 fields are 16-byte aligned.
*
* \since This datatype is available since SDL 3.2.0.
*
* \sa SDL_CreateGPUBuffer
@@ -1361,6 +1366,7 @@ typedef struct SDL_GPUTextureLocation
*
* \sa SDL_UploadToGPUTexture
* \sa SDL_DownloadFromGPUTexture
* \sa SDL_CreateGPUTexture
*/
typedef struct SDL_GPUTextureRegion
{
@@ -1550,6 +1556,7 @@ typedef struct SDL_GPUVertexBufferDescription
*
* \sa SDL_GPUVertexBufferDescription
* \sa SDL_GPUVertexInputState
* \sa SDL_GPUVertexElementFormat
*/
typedef struct SDL_GPUVertexAttribute
{
@@ -1809,6 +1816,7 @@ typedef struct SDL_GPUGraphicsPipelineTargetInfo
* \since This struct is available since SDL 3.2.0.
*
* \sa SDL_CreateGPUGraphicsPipeline
* \sa SDL_GPUShader
* \sa SDL_GPUVertexInputState
* \sa SDL_GPUPrimitiveType
* \sa SDL_GPURasterizerState
@@ -1836,6 +1844,7 @@ typedef struct SDL_GPUGraphicsPipelineCreateInfo
* \since This struct is available since SDL 3.2.0.
*
* \sa SDL_CreateGPUComputePipeline
* \sa SDL_GPUShaderFormat
*/
typedef struct SDL_GPUComputePipelineCreateInfo
{
@@ -2490,6 +2499,10 @@ extern SDL_DECLSPEC SDL_GPUTexture *SDLCALL SDL_CreateGPUTexture(
* Note that certain combinations of usage flags are invalid. For example, a
* buffer cannot have both the VERTEX and INDEX flags.
*
* If you use a STORAGE flag, the data in the buffer must respect std140
* layout conventions. In practical terms this means you must ensure that vec3
* and vec4 fields are 16-byte aligned.
*
* For better understanding of underlying concepts and memory management with
* SDL GPU API, you may refer
* [this blog post](https://moonside.games/posts/sdl-gpu-concepts-cycling/)
@@ -2792,6 +2805,10 @@ extern SDL_DECLSPEC SDL_GPUCommandBuffer *SDLCALL SDL_AcquireGPUCommandBuffer(
*
* Subsequent draw calls will use this uniform data.
*
* The data being pushed must respect std140 layout conventions. In practical
* terms this means you must ensure that vec3 and vec4 fields are 16-byte
* aligned.
*
* \param command_buffer a command buffer.
* \param slot_index the vertex uniform slot to push data to.
* \param data client data to write.
@@ -2810,6 +2827,10 @@ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUVertexUniformData(
*
* Subsequent draw calls will use this uniform data.
*
* The data being pushed must respect std140 layout conventions. In practical
* terms this means you must ensure that vec3 and vec4 fields are 16-byte
* aligned.
*
* \param command_buffer a command buffer.
* \param slot_index the fragment uniform slot to push data to.
* \param data client data to write.
@@ -2828,6 +2849,10 @@ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUFragmentUniformData(
*
* Subsequent draw calls will use this uniform data.
*
* The data being pushed must respect std140 layout conventions. In practical
* terms this means you must ensure that vec3 and vec4 fields are 16-byte
* aligned.
*
* \param command_buffer a command buffer.
* \param slot_index the uniform slot to push data to.
* \param data client data to write.
@@ -2978,6 +3003,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUIndexBuffer(
*
* The textures must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.
*
* Be sure your shader is set up according to the requirements documented in
* SDL_CreateGPUShader().
*
* \param render_pass a render pass handle.
* \param first_slot the vertex sampler slot to begin binding from.
* \param texture_sampler_bindings an array of texture-sampler binding
@@ -2986,6 +3014,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUIndexBuffer(
* array.
*
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateGPUShader
*/
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexSamplers(
SDL_GPURenderPass *render_pass,
@@ -2999,12 +3029,17 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexSamplers(
* These textures must have been created with
* SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ.
*
* Be sure your shader is set up according to the requirements documented in
* SDL_CreateGPUShader().
*
* \param render_pass a render pass handle.
* \param first_slot the vertex storage texture slot to begin binding from.
* \param storage_textures an array of storage textures.
* \param num_bindings the number of storage texture to bind from the array.
*
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateGPUShader
*/
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexStorageTextures(
SDL_GPURenderPass *render_pass,
@@ -3018,12 +3053,17 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexStorageTextures(
* These buffers must have been created with
* SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ.
*
* Be sure your shader is set up according to the requirements documented in
* SDL_CreateGPUShader().
*
* \param render_pass a render pass handle.
* \param first_slot the vertex storage buffer slot to begin binding from.
* \param storage_buffers an array of buffers.
* \param num_bindings the number of buffers to bind from the array.
*
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateGPUShader
*/
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexStorageBuffers(
SDL_GPURenderPass *render_pass,
@@ -3036,6 +3076,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexStorageBuffers(
*
* The textures must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.
*
* Be sure your shader is set up according to the requirements documented in
* SDL_CreateGPUShader().
*
* \param render_pass a render pass handle.
* \param first_slot the fragment sampler slot to begin binding from.
* \param texture_sampler_bindings an array of texture-sampler binding
@@ -3044,6 +3087,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUVertexStorageBuffers(
* array.
*
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateGPUShader
*/
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentSamplers(
SDL_GPURenderPass *render_pass,
@@ -3057,12 +3102,17 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentSamplers(
* These textures must have been created with
* SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ.
*
* Be sure your shader is set up according to the requirements documented in
* SDL_CreateGPUShader().
*
* \param render_pass a render pass handle.
* \param first_slot the fragment storage texture slot to begin binding from.
* \param storage_textures an array of storage textures.
* \param num_bindings the number of storage textures to bind from the array.
*
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateGPUShader
*/
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentStorageTextures(
SDL_GPURenderPass *render_pass,
@@ -3076,12 +3126,17 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentStorageTextures(
* These buffers must have been created with
* SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ.
*
* Be sure your shader is set up according to the requirements documented in
* SDL_CreateGPUShader().
*
* \param render_pass a render pass handle.
* \param first_slot the fragment storage buffer slot to begin binding from.
* \param storage_buffers an array of storage buffers.
* \param num_bindings the number of storage buffers to bind from the array.
*
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateGPUShader
*/
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUFragmentStorageBuffers(
SDL_GPURenderPass *render_pass,
@@ -3269,6 +3324,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputePipeline(
*
* The textures must have been created with SDL_GPU_TEXTUREUSAGE_SAMPLER.
*
* Be sure your shader is set up according to the requirements documented in
* SDL_CreateGPUShader().
*
* \param compute_pass a compute pass handle.
* \param first_slot the compute sampler slot to begin binding from.
* \param texture_sampler_bindings an array of texture-sampler binding
@@ -3277,6 +3335,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputePipeline(
* array.
*
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateGPUShader
*/
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeSamplers(
SDL_GPUComputePass *compute_pass,
@@ -3290,12 +3350,17 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeSamplers(
* These textures must have been created with
* SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ.
*
* Be sure your shader is set up according to the requirements documented in
* SDL_CreateGPUShader().
*
* \param compute_pass a compute pass handle.
* \param first_slot the compute storage texture slot to begin binding from.
* \param storage_textures an array of storage textures.
* \param num_bindings the number of storage textures to bind from the array.
*
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateGPUShader
*/
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageTextures(
SDL_GPUComputePass *compute_pass,
@@ -3309,12 +3374,17 @@ extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageTextures(
* These buffers must have been created with
* SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ.
*
* Be sure your shader is set up according to the requirements documented in
* SDL_CreateGPUShader().
*
* \param compute_pass a compute pass handle.
* \param first_slot the compute storage buffer slot to begin binding from.
* \param storage_buffers an array of storage buffer binding structs.
* \param num_bindings the number of storage buffers to bind from the array.
*
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateGPUShader
*/
extern SDL_DECLSPEC void SDLCALL SDL_BindGPUComputeStorageBuffers(
SDL_GPUComputePass *compute_pass,
@@ -3389,7 +3459,9 @@ extern SDL_DECLSPEC void SDLCALL SDL_EndGPUComputePass(
/**
* Maps a transfer buffer into application address space.
*
* You must unmap the transfer buffer before encoding upload commands.
* You must unmap the transfer buffer before encoding upload commands. The
* memory is owned by the graphics driver - do NOT call SDL_free() on the
* returned pointer.
*
* \param device a GPU context.
* \param transfer_buffer a transfer buffer.
@@ -4004,6 +4076,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_QueryGPUFence(
/**
* Releases a fence obtained from SDL_SubmitGPUCommandBufferAndAcquireFence.
*
* You must not reference the fence after calling this function.
*
* \param device a GPU context.
* \param fence a fence.
*

View File

@@ -71,6 +71,8 @@ typedef struct SDL_GUID {
* \param pszGUID buffer in which to write the ASCII string.
* \param cbGUID the size of pszGUID, should be at least 33 bytes.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_StringToGUID
@@ -87,6 +89,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_GUIDToString(SDL_GUID guid, char *pszGUID,
* \param pchGUID string containing an ASCII representation of a GUID.
* \returns a SDL_GUID structure.
*
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_GUIDToString

View File

@@ -2349,8 +2349,8 @@ extern "C" {
#define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH "SDL_MAC_OPENGL_ASYNC_DISPATCH"
/**
* A variable controlling whether the Option () key on macOS should be
* remapped to act as the Alt key.
* A variable controlling whether the Option key on macOS should be remapped
* to act as the Alt key.
*
* The variable can be set to the following values:
*

View File

@@ -56,6 +56,15 @@
* - Windows: debug output stream
* - Android: log output
* - Others: standard error output (stderr)
*
* You don't need to have a newline (`\n`) on the end of messages, the
* functions will do that for you. For consistent behavior cross-platform, you
* shouldn't have any newlines in messages, such as to log multiple lines in
* one call; unusual platform-specific behavior can be observed in such usage.
* Do one log call per line instead, with no newlines in messages.
*
* Each log call is atomic, so you won't see log messages cut off one another
* when logging from multiple threads.
*/
#ifndef SDL_log_h_

View File

@@ -471,8 +471,6 @@
* \since This macro is available since SDL 3.2.0.
*/
#define SDL_PLATFORM_3DS 1
#undef __3DS__
#endif
#endif /* SDL_platform_defines_h_ */

View File

@@ -173,13 +173,13 @@ typedef enum SDL_ProcessIO
* standard input when `SDL_PROP_PROCESS_CREATE_STDIN_NUMBER` is set to
* `SDL_PROCESS_STDIO_REDIRECT`.
* - `SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER`: an SDL_ProcessIO value
* describing where standard output for the process goes go, defaults to
* describing where standard output for the process goes to, defaults to
* `SDL_PROCESS_STDIO_INHERITED`.
* - `SDL_PROP_PROCESS_CREATE_STDOUT_POINTER`: an SDL_IOStream pointer used
* for standard output when `SDL_PROP_PROCESS_CREATE_STDOUT_NUMBER` is set
* to `SDL_PROCESS_STDIO_REDIRECT`.
* - `SDL_PROP_PROCESS_CREATE_STDERR_NUMBER`: an SDL_ProcessIO value
* describing where standard error for the process goes go, defaults to
* describing where standard error for the process goes to, defaults to
* `SDL_PROCESS_STDIO_INHERITED`.
* - `SDL_PROP_PROCESS_CREATE_STDERR_POINTER`: an SDL_IOStream pointer used
* for standard error when `SDL_PROP_PROCESS_CREATE_STDERR_NUMBER` is set to

View File

@@ -371,7 +371,7 @@ SDL_FORCE_INLINE bool SDL_RectEmptyFloat(const SDL_FRect *r)
*
* \sa SDL_RectsEqualFloat
*/
SDL_FORCE_INLINE bool SDL_RectsEqualEpsilon(const SDL_FRect *a, const SDL_FRect *b, const float epsilon)
SDL_FORCE_INLINE bool SDL_RectsEqualEpsilon(const SDL_FRect *a, const SDL_FRect *b, float epsilon)
{
return (a && b && ((a == b) ||
((SDL_fabsf(a->x - b->x) <= epsilon) &&

View File

@@ -31,9 +31,9 @@
/* #undef SDL_VENDOR_INFO */
#ifdef SDL_VENDOR_INFO
#define SDL_REVISION "SDL3-3.2.0-release-3.2.0 (" SDL_VENDOR_INFO ")"
#define SDL_REVISION "SDL3-3.2.4-release-3.2.4 (" SDL_VENDOR_INFO ")"
#else
#define SDL_REVISION "SDL3-3.2.0-release-3.2.0"
#define SDL_REVISION "SDL3-3.2.4-release-3.2.4"
#endif
#endif /* SDL_revision_h_ */

View File

@@ -4701,7 +4701,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_atan2(double y, double x);
*
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_atan2f
* \sa SDL_atan2
* \sa SDL_atan
* \sa SDL_tan
*/
@@ -4810,7 +4810,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_copysign(double x, double y);
*
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_copysignf
* \sa SDL_copysign
* \sa SDL_fabsf
*/
extern SDL_DECLSPEC float SDLCALL SDL_copysignf(float x, float y);
@@ -4943,7 +4943,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_expf(float x);
* Range: `0 <= y <= INF`
*
* This function operates on double-precision floating point values, use
* SDL_copysignf for single-precision floats.
* SDL_fabsf for single-precision floats.
*
* \param x floating point value to use as the magnitude.
* \returns the absolute value of `x`.
@@ -4964,7 +4964,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_fabs(double x);
* Range: `0 <= y <= INF`
*
* This function operates on single-precision floating point values, use
* SDL_copysignf for double-precision floats.
* SDL_fabs for double-precision floats.
*
* \param x floating point value to use as the magnitude.
* \returns the absolute value of `x`.
@@ -5016,7 +5016,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_floor(double x);
* Range: `-INF <= y <= INF`, y integer
*
* This function operates on single-precision floating point values, use
* SDL_floorf for double-precision floats.
* SDL_floor for double-precision floats.
*
* \param x floating point value.
* \returns the floor of `x`.
@@ -5073,7 +5073,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_trunc(double x);
* Range: `-INF <= y <= INF`, y integer
*
* This function operates on single-precision floating point values, use
* SDL_truncf for double-precision floats.
* SDL_trunc for double-precision floats.
*
* \param x floating point value.
* \returns `x` truncated to an integer.
@@ -5131,7 +5131,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_fmod(double x, double y);
* Range: `-y <= z <= y`
*
* This function operates on single-precision floating point values, use
* SDL_fmod for single-precision floats.
* SDL_fmod for double-precision floats.
*
* \param x the numerator.
* \param y the denominator. Must not be 0.
@@ -5409,7 +5409,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_pow(double x, double y);
* instead.
*
* This function operates on single-precision floating point values, use
* SDL_powf for double-precision floats.
* SDL_pow for double-precision floats.
*
* This function may use a different approximation across different versions,
* platforms and configurations. i.e, it can return a different value given
@@ -5469,8 +5469,8 @@ extern SDL_DECLSPEC double SDLCALL SDL_round(double x);
*
* Range: `-INF <= y <= INF`, y integer
*
* This function operates on double-precision floating point values, use
* SDL_roundf for single-precision floats. To get the result as an integer
* This function operates on single-precision floating point values, use
* SDL_round for double-precision floats. To get the result as an integer
* type, use SDL_lroundf.
*
* \param x floating point value.
@@ -5499,7 +5499,7 @@ extern SDL_DECLSPEC float SDLCALL SDL_roundf(float x);
* Range: `MIN_LONG <= y <= MAX_LONG`
*
* This function operates on double-precision floating point values, use
* SDL_lround for single-precision floats. To get the result as a
* SDL_lroundf for single-precision floats. To get the result as a
* floating-point type, use SDL_round.
*
* \param x floating point value.
@@ -5528,8 +5528,8 @@ extern SDL_DECLSPEC long SDLCALL SDL_lround(double x);
* Range: `MIN_LONG <= y <= MAX_LONG`
*
* This function operates on single-precision floating point values, use
* SDL_lroundf for double-precision floats. To get the result as a
* floating-point type, use SDL_roundf,
* SDL_lround for double-precision floats. To get the result as a
* floating-point type, use SDL_roundf.
*
* \param x floating point value.
* \returns the nearest integer to `x`.
@@ -5742,7 +5742,7 @@ extern SDL_DECLSPEC double SDLCALL SDL_tan(double x);
* Range: `-INF <= y <= INF`
*
* This function operates on single-precision floating point values, use
* SDL_tanf for double-precision floats.
* SDL_tan for double-precision floats.
*
* This function may use a different approximation across different versions,
* platforms and configurations. i.e, it can return a different value given

View File

@@ -636,10 +636,10 @@ extern SDL_DECLSPEC Uint64 SDLCALL SDL_GetStorageSpaceRemaining(SDL_Storage *sto
* Enumerate a directory tree, filtered by pattern, and return a list.
*
* Files are filtered out if they don't match the string in `pattern`, which
* may contain wildcard characters '*' (match everything) and '?' (match one
* may contain wildcard characters `*` (match everything) and `?` (match one
* character). If pattern is NULL, no filtering is done and all results are
* returned. Subdirectories are permitted, and are specified with a path
* separator of '/'. Wildcard characters '*' and '?' never match a path
* separator of '/'. Wildcard characters `*` and `?` never match a path
* separator.
*
* `flags` may be set to SDL_GLOB_CASEINSENSITIVE to make the pattern matching

View File

@@ -73,7 +73,7 @@ typedef Uint32 SDL_SurfaceFlags;
*
* \since This macro is available since SDL 3.2.0.
*/
#define SDL_MUSTLOCK(S) ((((S)->flags & SDL_SURFACE_LOCK_NEEDED)) == SDL_SURFACE_LOCK_NEEDED)
#define SDL_MUSTLOCK(S) (((S)->flags & SDL_SURFACE_LOCK_NEEDED) == SDL_SURFACE_LOCK_NEEDED)
/**
* The scaling mode.
@@ -1173,6 +1173,29 @@ extern SDL_DECLSPEC bool SDLCALL SDL_BlitSurfaceScaled(SDL_Surface *src, const S
*/
extern SDL_DECLSPEC bool SDLCALL SDL_BlitSurfaceUncheckedScaled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect, SDL_ScaleMode scaleMode);
/**
* Perform a stretched pixel copy from one surface to another.
*
* \param src the SDL_Surface structure to be copied from.
* \param srcrect the SDL_Rect structure representing the rectangle to be
* copied, may not be NULL.
* \param dst the SDL_Surface structure that is the blit target.
* \param dstrect the SDL_Rect structure representing the target rectangle in
* the destination surface, may not be NULL.
* \param scaleMode the SDL_ScaleMode to be used.
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
* \threadsafety The same destination surface should not be used from two
* threads at once. It is safe to use the same source surface
* from multiple threads.
*
* \since This function is available since SDL 3.4.0.
*
* \sa SDL_BlitSurfaceScaled
*/
extern SDL_DECLSPEC bool SDLCALL SDL_StretchSurface(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, const SDL_Rect *dstrect, SDL_ScaleMode scaleMode);
/**
* Perform a tiled blit to a destination surface, which may be of a different
* format.

View File

@@ -250,7 +250,7 @@ extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_GetTraySubmenu(SDL_TrayEntry *entr
* Returns a list of entries in the menu, in order.
*
* \param menu The menu to get entries from.
* \param size An optional pointer to obtain the number of entries in the
* \param count An optional pointer to obtain the number of entries in the
* menu.
* \returns a NULL-terminated list of entries within the given menu. The
* pointer becomes invalid when any function that inserts or deletes
@@ -264,7 +264,7 @@ extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_GetTraySubmenu(SDL_TrayEntry *entr
* \sa SDL_RemoveTrayEntry
* \sa SDL_InsertTrayEntryAt
*/
extern SDL_DECLSPEC const SDL_TrayEntry **SDLCALL SDL_GetTrayEntries(SDL_TrayMenu *menu, int *size);
extern SDL_DECLSPEC const SDL_TrayEntry ** SDLCALL SDL_GetTrayEntries(SDL_TrayMenu *menu, int *count);
/**
* Removes a tray entry.

View File

@@ -62,7 +62,7 @@ extern "C" {
*
* \since This macro is available since SDL 3.2.0.
*/
#define SDL_MICRO_VERSION 0
#define SDL_MICRO_VERSION 4
/**
* This macro turns the version numbers into a numeric value.

View File

@@ -90,7 +90,7 @@ namespace Flax.Deps.Dependencies
CloneGitRepo(root, "https://github.com/libsdl-org/SDL");
GitFetch(root);
GitResetToCommit(root, "535d80badefc83c5c527ec5748f2a20d6a9310fe"); // 3.2.0
GitResetToCommit(root, "b5c3eab6b447111d3c7879bb547b80fb4abd9063"); // 3.2.4
foreach (var platform in options.Platforms)
{