From 4d3588d09e214f84ba09ba6278287ad8dc7e8bb3 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Thu, 13 Feb 2025 17:59:28 +0200 Subject: [PATCH] Update SDL3 to 3.2.4 --- Source/ThirdParty/SDL/SDL3/SDL.h | 2 +- Source/ThirdParty/SDL/SDL3/SDL_atomic.h | 2 +- Source/ThirdParty/SDL/SDL3/SDL_audio.h | 15 ++- Source/ThirdParty/SDL/SDL3/SDL_camera.h | 4 +- Source/ThirdParty/SDL/SDL3/SDL_gamepad.h | 2 +- Source/ThirdParty/SDL/SDL3/SDL_gpu.h | 108 +++++++++++++++--- Source/ThirdParty/SDL/SDL3/SDL_guid.h | 4 + Source/ThirdParty/SDL/SDL3/SDL_hints.h | 6 +- Source/ThirdParty/SDL/SDL3/SDL_log.h | 9 ++ Source/ThirdParty/SDL/SDL3/SDL_mouse.h | 6 +- .../SDL/SDL3/SDL_platform_defines.h | 2 - Source/ThirdParty/SDL/SDL3/SDL_process.h | 12 +- Source/ThirdParty/SDL/SDL3/SDL_rect.h | 2 +- Source/ThirdParty/SDL/SDL3/SDL_revision.h | 4 +- Source/ThirdParty/SDL/SDL3/SDL_stdinc.h | 28 ++--- Source/ThirdParty/SDL/SDL3/SDL_storage.h | 4 +- Source/ThirdParty/SDL/SDL3/SDL_surface.h | 25 +++- Source/ThirdParty/SDL/SDL3/SDL_test_common.h | 2 +- Source/ThirdParty/SDL/SDL3/SDL_thread.h | 2 +- Source/ThirdParty/SDL/SDL3/SDL_tray.h | 26 ++--- Source/ThirdParty/SDL/SDL3/SDL_version.h | 2 +- Source/ThirdParty/SDL/SDL3/SDL_vulkan.h | 2 +- .../Tools/Flax.Build/Deps/Dependencies/SDL.cs | 2 +- 23 files changed, 191 insertions(+), 80 deletions(-) diff --git a/Source/ThirdParty/SDL/SDL3/SDL.h b/Source/ThirdParty/SDL/SDL3/SDL.h index 861c404f5..4fd4083d3 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL.h +++ b/Source/ThirdParty/SDL/SDL3/SDL.h @@ -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 diff --git a/Source/ThirdParty/SDL/SDL3/SDL_atomic.h b/Source/ThirdParty/SDL/SDL3/SDL_atomic.h index 03e3fb134..78b5e0fa5 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_atomic.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_atomic.h @@ -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. * diff --git a/Source/ThirdParty/SDL/SDL3/SDL_audio.h b/Source/ThirdParty/SDL/SDL3/SDL_audio.h index 956938215..541c5dfba 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_audio.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_audio.h @@ -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. diff --git a/Source/ThirdParty/SDL/SDL3/SDL_camera.h b/Source/ThirdParty/SDL/SDL3/SDL_camera.h index c4d05962b..5f3911fdf 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_camera.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_camera.h @@ -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. diff --git a/Source/ThirdParty/SDL/SDL3/SDL_gamepad.h b/Source/ThirdParty/SDL/SDL3/SDL_gamepad.h index 264f763b2..99f8b6593 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_gamepad.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_gamepad.h @@ -29,7 +29,7 @@ * "joysticks" now are actually console-style gamepads. So SDL provides the * gamepad API on top of the lower-level joystick functionality. * - * The difference betweena joystick and a gamepad is that a gamepad tells you + * The difference between a joystick and a gamepad is that a gamepad tells you * _where_ a button or axis is on the device. You don't speak to gamepads in * terms of arbitrary numbers like "button 3" or "axis 2" but in standard * locations: the d-pad, the shoulder buttons, triggers, A/B/X/Y (or diff --git a/Source/ThirdParty/SDL/SDL3/SDL_gpu.h b/Source/ThirdParty/SDL/SDL3/SDL_gpu.h index fa870a579..c3a3db7fd 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_gpu.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_gpu.h @@ -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 { @@ -2104,7 +2113,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GPUSupportsProperties( * \sa SDL_DestroyGPUDevice * \sa SDL_GPUSupportsShaderFormats */ -extern SDL_DECLSPEC SDL_GPUDevice *SDLCALL SDL_CreateGPUDevice( +extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDevice( SDL_GPUShaderFormat format_flags, bool debug_mode, const char *name); @@ -2152,7 +2161,7 @@ extern SDL_DECLSPEC SDL_GPUDevice *SDLCALL SDL_CreateGPUDevice( * \sa SDL_DestroyGPUDevice * \sa SDL_GPUSupportsProperties */ -extern SDL_DECLSPEC SDL_GPUDevice *SDLCALL SDL_CreateGPUDeviceWithProperties( +extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDeviceWithProperties( SDL_PropertiesID props); #define SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN "SDL.gpu.device.create.debugmode" @@ -2275,7 +2284,7 @@ extern SDL_DECLSPEC SDL_GPUShaderFormat SDLCALL SDL_GetGPUShaderFormats(SDL_GPUD * \sa SDL_BindGPUComputePipeline * \sa SDL_ReleaseGPUComputePipeline */ -extern SDL_DECLSPEC SDL_GPUComputePipeline *SDLCALL SDL_CreateGPUComputePipeline( +extern SDL_DECLSPEC SDL_GPUComputePipeline * SDLCALL SDL_CreateGPUComputePipeline( SDL_GPUDevice *device, const SDL_GPUComputePipelineCreateInfo *createinfo); @@ -2302,7 +2311,7 @@ extern SDL_DECLSPEC SDL_GPUComputePipeline *SDLCALL SDL_CreateGPUComputePipeline * \sa SDL_BindGPUGraphicsPipeline * \sa SDL_ReleaseGPUGraphicsPipeline */ -extern SDL_DECLSPEC SDL_GPUGraphicsPipeline *SDLCALL SDL_CreateGPUGraphicsPipeline( +extern SDL_DECLSPEC SDL_GPUGraphicsPipeline * SDLCALL SDL_CreateGPUGraphicsPipeline( SDL_GPUDevice *device, const SDL_GPUGraphicsPipelineCreateInfo *createinfo); @@ -2329,7 +2338,7 @@ extern SDL_DECLSPEC SDL_GPUGraphicsPipeline *SDLCALL SDL_CreateGPUGraphicsPipeli * \sa SDL_BindGPUFragmentSamplers * \sa SDL_ReleaseGPUSampler */ -extern SDL_DECLSPEC SDL_GPUSampler *SDLCALL SDL_CreateGPUSampler( +extern SDL_DECLSPEC SDL_GPUSampler * SDLCALL SDL_CreateGPUSampler( SDL_GPUDevice *device, const SDL_GPUSamplerCreateInfo *createinfo); @@ -2408,7 +2417,7 @@ extern SDL_DECLSPEC SDL_GPUSampler *SDLCALL SDL_CreateGPUSampler( * \sa SDL_CreateGPUGraphicsPipeline * \sa SDL_ReleaseGPUShader */ -extern SDL_DECLSPEC SDL_GPUShader *SDLCALL SDL_CreateGPUShader( +extern SDL_DECLSPEC SDL_GPUShader * SDLCALL SDL_CreateGPUShader( SDL_GPUDevice *device, const SDL_GPUShaderCreateInfo *createinfo); @@ -2469,7 +2478,7 @@ extern SDL_DECLSPEC SDL_GPUShader *SDLCALL SDL_CreateGPUShader( * \sa SDL_ReleaseGPUTexture * \sa SDL_GPUTextureSupportsFormat */ -extern SDL_DECLSPEC SDL_GPUTexture *SDLCALL SDL_CreateGPUTexture( +extern SDL_DECLSPEC SDL_GPUTexture * SDLCALL SDL_CreateGPUTexture( SDL_GPUDevice *device, const SDL_GPUTextureCreateInfo *createinfo); @@ -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/) @@ -2521,7 +2534,7 @@ extern SDL_DECLSPEC SDL_GPUTexture *SDLCALL SDL_CreateGPUTexture( * \sa SDL_DispatchGPUComputeIndirect * \sa SDL_ReleaseGPUBuffer */ -extern SDL_DECLSPEC SDL_GPUBuffer *SDLCALL SDL_CreateGPUBuffer( +extern SDL_DECLSPEC SDL_GPUBuffer * SDLCALL SDL_CreateGPUBuffer( SDL_GPUDevice *device, const SDL_GPUBufferCreateInfo *createinfo); @@ -2554,7 +2567,7 @@ extern SDL_DECLSPEC SDL_GPUBuffer *SDLCALL SDL_CreateGPUBuffer( * \sa SDL_DownloadFromGPUTexture * \sa SDL_ReleaseGPUTransferBuffer */ -extern SDL_DECLSPEC SDL_GPUTransferBuffer *SDLCALL SDL_CreateGPUTransferBuffer( +extern SDL_DECLSPEC SDL_GPUTransferBuffer * SDLCALL SDL_CreateGPUTransferBuffer( SDL_GPUDevice *device, const SDL_GPUTransferBufferCreateInfo *createinfo); @@ -2782,7 +2795,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUGraphicsPipeline( * \sa SDL_SubmitGPUCommandBuffer * \sa SDL_SubmitGPUCommandBufferAndAcquireFence */ -extern SDL_DECLSPEC SDL_GPUCommandBuffer *SDLCALL SDL_AcquireGPUCommandBuffer( +extern SDL_DECLSPEC SDL_GPUCommandBuffer * SDLCALL SDL_AcquireGPUCommandBuffer( SDL_GPUDevice *device); /* Uniform Data */ @@ -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. @@ -2868,7 +2893,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_PushGPUComputeUniformData( * * \sa SDL_EndGPURenderPass */ -extern SDL_DECLSPEC SDL_GPURenderPass *SDLCALL SDL_BeginGPURenderPass( +extern SDL_DECLSPEC SDL_GPURenderPass * SDLCALL SDL_BeginGPURenderPass( SDL_GPUCommandBuffer *command_buffer, const SDL_GPUColorTargetInfo *color_target_infos, Uint32 num_color_targets, @@ -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, @@ -3245,7 +3300,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_EndGPURenderPass( * * \sa SDL_EndGPUComputePass */ -extern SDL_DECLSPEC SDL_GPUComputePass *SDLCALL SDL_BeginGPUComputePass( +extern SDL_DECLSPEC SDL_GPUComputePass * SDLCALL SDL_BeginGPUComputePass( SDL_GPUCommandBuffer *command_buffer, const SDL_GPUStorageTextureReadWriteBinding *storage_texture_bindings, Uint32 num_storage_texture_bindings, @@ -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. @@ -3399,7 +3471,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_EndGPUComputePass( * * \since This function is available since SDL 3.2.0. */ -extern SDL_DECLSPEC void *SDLCALL SDL_MapGPUTransferBuffer( +extern SDL_DECLSPEC void * SDLCALL SDL_MapGPUTransferBuffer( SDL_GPUDevice *device, SDL_GPUTransferBuffer *transfer_buffer, bool cycle); @@ -3430,7 +3502,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_UnmapGPUTransferBuffer( * * \since This function is available since SDL 3.2.0. */ -extern SDL_DECLSPEC SDL_GPUCopyPass *SDLCALL SDL_BeginGPUCopyPass( +extern SDL_DECLSPEC SDL_GPUCopyPass * SDLCALL SDL_BeginGPUCopyPass( SDL_GPUCommandBuffer *command_buffer); /** @@ -3922,7 +3994,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SubmitGPUCommandBuffer( * \sa SDL_SubmitGPUCommandBuffer * \sa SDL_ReleaseGPUFence */ -extern SDL_DECLSPEC SDL_GPUFence *SDLCALL SDL_SubmitGPUCommandBufferAndAcquireFence( +extern SDL_DECLSPEC SDL_GPUFence * SDLCALL SDL_SubmitGPUCommandBufferAndAcquireFence( SDL_GPUCommandBuffer *command_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. * diff --git a/Source/ThirdParty/SDL/SDL3/SDL_guid.h b/Source/ThirdParty/SDL/SDL3/SDL_guid.h index e2f32ffc9..312c42c03 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_guid.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_guid.h @@ -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 diff --git a/Source/ThirdParty/SDL/SDL3/SDL_hints.h b/Source/ThirdParty/SDL/SDL3/SDL_hints.h index 8f2d074d1..ba98e74f0 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_hints.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_hints.h @@ -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: * @@ -4360,7 +4360,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_ResetHints(void); * \sa SDL_SetHint * \sa SDL_SetHintWithPriority */ -extern SDL_DECLSPEC const char *SDLCALL SDL_GetHint(const char *name); +extern SDL_DECLSPEC const char * SDLCALL SDL_GetHint(const char *name); /** * Get the boolean value of a hint variable. diff --git a/Source/ThirdParty/SDL/SDL3/SDL_log.h b/Source/ThirdParty/SDL/SDL3/SDL_log.h index a56476c6d..5610420ca 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_log.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_log.h @@ -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_ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_mouse.h b/Source/ThirdParty/SDL/SDL3/SDL_mouse.h index 18856e20e..864135d2b 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_mouse.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_mouse.h @@ -353,7 +353,7 @@ extern SDL_DECLSPEC SDL_MouseButtonFlags SDLCALL SDL_GetRelativeMouseState(float * * \sa SDL_WarpMouseGlobal */ -extern SDL_DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window * window, +extern SDL_DECLSPEC void SDLCALL SDL_WarpMouseInWindow(SDL_Window *window, float x, float y); /** @@ -514,8 +514,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CaptureMouse(bool enabled); * \sa SDL_DestroyCursor * \sa SDL_SetCursor */ -extern SDL_DECLSPEC SDL_Cursor * SDLCALL SDL_CreateCursor(const Uint8 * data, - const Uint8 * mask, +extern SDL_DECLSPEC SDL_Cursor * SDLCALL SDL_CreateCursor(const Uint8 *data, + const Uint8 *mask, int w, int h, int hot_x, int hot_y); diff --git a/Source/ThirdParty/SDL/SDL3/SDL_platform_defines.h b/Source/ThirdParty/SDL/SDL3/SDL_platform_defines.h index 7e9a0a92a..6b240a8be 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_platform_defines.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_platform_defines.h @@ -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_ */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_process.h b/Source/ThirdParty/SDL/SDL3/SDL_process.h index 2cc77395b..511b2f9c5 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_process.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_process.h @@ -103,7 +103,7 @@ typedef struct SDL_Process SDL_Process; * \sa SDL_WaitProcess * \sa SDL_DestroyProcess */ -extern SDL_DECLSPEC SDL_Process *SDLCALL SDL_CreateProcess(const char * const *args, bool pipe_stdio); +extern SDL_DECLSPEC SDL_Process * SDLCALL SDL_CreateProcess(const char * const *args, bool pipe_stdio); /** * Description of where standard I/O should be directed when creating a @@ -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 @@ -215,7 +215,7 @@ typedef enum SDL_ProcessIO * \sa SDL_WaitProcess * \sa SDL_DestroyProcess */ -extern SDL_DECLSPEC SDL_Process *SDLCALL SDL_CreateProcessWithProperties(SDL_PropertiesID props); +extern SDL_DECLSPEC SDL_Process * SDLCALL SDL_CreateProcessWithProperties(SDL_PropertiesID props); #define SDL_PROP_PROCESS_CREATE_ARGS_POINTER "SDL.process.create.args" #define SDL_PROP_PROCESS_CREATE_ENVIRONMENT_POINTER "SDL.process.create.environment" @@ -320,7 +320,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_ReadProcess(SDL_Process *process, size_t * \sa SDL_CreateProcessWithProperties * \sa SDL_GetProcessOutput */ -extern SDL_DECLSPEC SDL_IOStream *SDLCALL SDL_GetProcessInput(SDL_Process *process); +extern SDL_DECLSPEC SDL_IOStream * SDLCALL SDL_GetProcessInput(SDL_Process *process); /** * Get the SDL_IOStream associated with process standard output. @@ -344,7 +344,7 @@ extern SDL_DECLSPEC SDL_IOStream *SDLCALL SDL_GetProcessInput(SDL_Process *proce * \sa SDL_CreateProcessWithProperties * \sa SDL_GetProcessInput */ -extern SDL_DECLSPEC SDL_IOStream *SDLCALL SDL_GetProcessOutput(SDL_Process *process); +extern SDL_DECLSPEC SDL_IOStream * SDLCALL SDL_GetProcessOutput(SDL_Process *process); /** * Stop a process. diff --git a/Source/ThirdParty/SDL/SDL3/SDL_rect.h b/Source/ThirdParty/SDL/SDL3/SDL_rect.h index 8998de6f4..eb2d34a69 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_rect.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_rect.h @@ -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) && diff --git a/Source/ThirdParty/SDL/SDL3/SDL_revision.h b/Source/ThirdParty/SDL/SDL3/SDL_revision.h index c045c2d4d..c7cf07689 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_revision.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_revision.h @@ -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_ */ diff --git a/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h b/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h index 4e15a3c64..c16392861 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_stdinc.h @@ -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 diff --git a/Source/ThirdParty/SDL/SDL3/SDL_storage.h b/Source/ThirdParty/SDL/SDL3/SDL_storage.h index 8b89ace18..d3599b932 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_storage.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_storage.h @@ -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 diff --git a/Source/ThirdParty/SDL/SDL3/SDL_surface.h b/Source/ThirdParty/SDL/SDL3/SDL_surface.h index 0752f5307..f2d20654b 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_surface.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_surface.h @@ -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. diff --git a/Source/ThirdParty/SDL/SDL3/SDL_test_common.h b/Source/ThirdParty/SDL/SDL3/SDL_test_common.h index 3ab1ad01c..91efe8ac3 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_test_common.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_test_common.h @@ -177,7 +177,7 @@ extern "C" { * * \returns a newly allocated common state object. */ -SDLTest_CommonState *SDLCALL SDLTest_CommonCreateState(char **argv, SDL_InitFlags flags); +SDLTest_CommonState * SDLCALL SDLTest_CommonCreateState(char **argv, SDL_InitFlags flags); /** * Free the common state object. diff --git a/Source/ThirdParty/SDL/SDL3/SDL_thread.h b/Source/ThirdParty/SDL/SDL3/SDL_thread.h index 277535fcb..e981b5429 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_thread.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_thread.h @@ -139,7 +139,7 @@ typedef enum SDL_ThreadState * * \since This datatype is available since SDL 3.2.0. */ -typedef int (SDLCALL * SDL_ThreadFunction) (void *data); +typedef int (SDLCALL *SDL_ThreadFunction) (void *data); #ifdef SDL_WIKI_DOCUMENTATION_SECTION diff --git a/Source/ThirdParty/SDL/SDL3/SDL_tray.h b/Source/ThirdParty/SDL/SDL3/SDL_tray.h index 0b05db25b..1780b0ba5 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_tray.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_tray.h @@ -118,7 +118,7 @@ typedef void (SDLCALL *SDL_TrayCallback)(void *userdata, SDL_TrayEntry *entry); * \sa SDL_GetTrayMenu * \sa SDL_DestroyTray */ -extern SDL_DECLSPEC SDL_Tray *SDLCALL SDL_CreateTray(SDL_Surface *icon, const char *tooltip); +extern SDL_DECLSPEC SDL_Tray * SDLCALL SDL_CreateTray(SDL_Surface *icon, const char *tooltip); /** * Updates the system tray icon's icon. @@ -172,7 +172,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayTooltip(SDL_Tray *tray, const char * * \sa SDL_GetTrayMenu * \sa SDL_GetTrayMenuParentTray */ -extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_CreateTrayMenu(SDL_Tray *tray); +extern SDL_DECLSPEC SDL_TrayMenu * SDLCALL SDL_CreateTrayMenu(SDL_Tray *tray); /** * Create a submenu for a system tray entry. @@ -196,7 +196,7 @@ extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_CreateTrayMenu(SDL_Tray *tray); * \sa SDL_GetTraySubmenu * \sa SDL_GetTrayMenuParentEntry */ -extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_CreateTraySubmenu(SDL_TrayEntry *entry); +extern SDL_DECLSPEC SDL_TrayMenu * SDLCALL SDL_CreateTraySubmenu(SDL_TrayEntry *entry); /** * Gets a previously created tray menu. @@ -220,7 +220,7 @@ extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_CreateTraySubmenu(SDL_TrayEntry *e * \sa SDL_CreateTray * \sa SDL_CreateTrayMenu */ -extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_GetTrayMenu(SDL_Tray *tray); +extern SDL_DECLSPEC SDL_TrayMenu * SDLCALL SDL_GetTrayMenu(SDL_Tray *tray); /** * Gets a previously created tray entry submenu. @@ -244,14 +244,14 @@ extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_GetTrayMenu(SDL_Tray *tray); * \sa SDL_InsertTrayEntryAt * \sa SDL_CreateTraySubmenu */ -extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_GetTraySubmenu(SDL_TrayEntry *entry); +extern SDL_DECLSPEC SDL_TrayMenu * SDLCALL SDL_GetTraySubmenu(SDL_TrayEntry *entry); /** * 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 - * menu. + * \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 * entries in the menu is called. @@ -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. @@ -307,7 +307,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_RemoveTrayEntry(SDL_TrayEntry *entry); * \sa SDL_RemoveTrayEntry * \sa SDL_GetTrayEntryParent */ -extern SDL_DECLSPEC SDL_TrayEntry *SDLCALL SDL_InsertTrayEntryAt(SDL_TrayMenu *menu, int pos, const char *label, SDL_TrayEntryFlags flags); +extern SDL_DECLSPEC SDL_TrayEntry * SDLCALL SDL_InsertTrayEntryAt(SDL_TrayMenu *menu, int pos, const char *label, SDL_TrayEntryFlags flags); /** * Sets the label of an entry. @@ -348,7 +348,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryLabel(SDL_TrayEntry *entry, con * \sa SDL_InsertTrayEntryAt * \sa SDL_SetTrayEntryLabel */ -extern SDL_DECLSPEC const char *SDLCALL SDL_GetTrayEntryLabel(SDL_TrayEntry *entry); +extern SDL_DECLSPEC const char * SDLCALL SDL_GetTrayEntryLabel(SDL_TrayEntry *entry); /** * Sets whether or not an entry is checked. @@ -481,7 +481,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyTray(SDL_Tray *tray); * * \sa SDL_InsertTrayEntryAt */ -extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_GetTrayEntryParent(SDL_TrayEntry *entry); +extern SDL_DECLSPEC SDL_TrayMenu * SDLCALL SDL_GetTrayEntryParent(SDL_TrayEntry *entry); /** * Gets the entry for which the menu is a submenu, if the current menu is a @@ -501,7 +501,7 @@ extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_GetTrayEntryParent(SDL_TrayEntry * * \sa SDL_CreateTraySubmenu * \sa SDL_GetTrayMenuParentTray */ -extern SDL_DECLSPEC SDL_TrayEntry *SDLCALL SDL_GetTrayMenuParentEntry(SDL_TrayMenu *menu); +extern SDL_DECLSPEC SDL_TrayEntry * SDLCALL SDL_GetTrayMenuParentEntry(SDL_TrayMenu *menu); /** * Gets the tray for which this menu is the first-level menu, if the current @@ -521,7 +521,7 @@ extern SDL_DECLSPEC SDL_TrayEntry *SDLCALL SDL_GetTrayMenuParentEntry(SDL_TrayMe * \sa SDL_CreateTrayMenu * \sa SDL_GetTrayMenuParentEntry */ -extern SDL_DECLSPEC SDL_Tray *SDLCALL SDL_GetTrayMenuParentTray(SDL_TrayMenu *menu); +extern SDL_DECLSPEC SDL_Tray * SDLCALL SDL_GetTrayMenuParentTray(SDL_TrayMenu *menu); /** * Update the trays. diff --git a/Source/ThirdParty/SDL/SDL3/SDL_version.h b/Source/ThirdParty/SDL/SDL3/SDL_version.h index 55014e3c1..2f7e955a5 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_version.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_version.h @@ -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. diff --git a/Source/ThirdParty/SDL/SDL3/SDL_vulkan.h b/Source/ThirdParty/SDL/SDL3/SDL_vulkan.h index 5a487561a..710afbe63 100644 --- a/Source/ThirdParty/SDL/SDL3/SDL_vulkan.h +++ b/Source/ThirdParty/SDL/SDL3/SDL_vulkan.h @@ -226,7 +226,7 @@ extern SDL_DECLSPEC char const * const * SDLCALL SDL_Vulkan_GetInstanceExtension extern SDL_DECLSPEC bool SDLCALL SDL_Vulkan_CreateSurface(SDL_Window *window, VkInstance instance, const struct VkAllocationCallbacks *allocator, - VkSurfaceKHR* surface); + VkSurfaceKHR *surface); /** * Destroy the Vulkan rendering surface of a window. diff --git a/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs b/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs index a2fb8bc1c..4bdb0fdf5 100644 --- a/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs +++ b/Source/Tools/Flax.Build/Deps/Dependencies/SDL.cs @@ -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) {