Compare commits

...
Author SHA1 Message Date
Ryan C. Gordon bcdb3eddcc WhatsNew.txt: Moved some missing entries over to the release-3.2.x branch.
Fixes #14622.
2025-12-08 11:08:04 -05:00
Qiu Qiang 057634d069 Fix loop variable bug in V4L2 camera format enumeration
(cherry picked from commit 19988c5faa)
2025-12-07 14:12:03 -08:00
LuncyBloont eb5eb4a33d Fix crash in UploadToTexture() on DX12.
(cherry picked from commit ab67be7e5a)
2025-12-05 11:47:02 -08:00
Eddy Jansson df145a9649 log: Fix unlikely out-of-bounds issue.
In the unlikely case that the overflow check should fail,
the else clause would switch to the truncated stack message
without updating the len variable. This would contain the
return value from vsnprintf(), meaning it could point beyond
the buffer.

The subsequent code which trims NL and CR from the buffer,
would then read -- and possibly write -- out-of-bounds.

To fix this, we split the two joint conditions into separate
if-clauses, and adjust the len variable in the case where we
know the message buffer was truncated.

(cherry picked from commit 2cb9a4fcc1)
2025-12-04 13:20:34 -08:00
cosmonaut b8618dd405 GPU: Remove erroneous buffer usage flag from defrag process
(cherry picked from commit aae2f74ae6)
2025-12-03 15:03:53 -08:00
Simon McVittie ddb497e815 testver: Assert that SDL_GetRevision() starts with SDL-
https://github.com/libsdl-org/SDL/issues/14575

Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 65ef4df6d4)
2025-12-03 08:51:53 -08:00
Simon McVittie 6a42180dbf build-scripts: Include SDL- prefix in SDL_REVISION when built from tarball
https://github.com/libsdl-org/SDL/issues/14575

Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit cc681ffeda)
2025-12-03 08:51:52 -08:00
Anonymous Maarten 223a3dc461 release: verify SDL_REVISION contains SDL-
(cherry picked from commit 3313cb9c4b)
2025-12-03 08:51:52 -08:00
Toast 13373ef501 Added Keychron V5 System Control to the controller blacklist
(cherry picked from commit 1dea7c801b)
2025-12-03 07:15:22 -08:00
Sam Lantinga a7de0d9a3e Updated to version 3.2.29 for development 2025-12-02 13:02:25 -08:00
18 changed files with 82 additions and 41 deletions

No files matched your search

+8
View File
@@ -95,9 +95,17 @@ jobs:
libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev
- name: 'CMake (configure + build + tests + examples)'
run: |
set -e
cmake -S ${{ steps.tar.outputs.path }} -B /tmp/build -DSDL_TEST_LIBRARY=TRUE -DSDL_TESTS=TRUE -DSDL_EXAMPLES=TRUE
cmake --build /tmp/build --verbose
ctest --test-dir /tmp/build --no-tests=error --output-on-failure
- name: 'Verify SDL_REVISION contains SDL-'
run: |
set -e
if test "x$(strings /tmp/build/libSDL3.so.0 | grep SDL- | wc -l)" != x1; then
echo "SDL- string not found: must be present in SDL_REVISION"
exit 1
fi
dmg:
needs: [src]
+1 -1
View File
@@ -5,7 +5,7 @@ if(NOT DEFINED CMAKE_BUILD_TYPE)
endif()
# See docs/release_checklist.md
project(SDL3 LANGUAGES C VERSION "3.2.28")
project(SDL3 LANGUAGES C VERSION "3.2.29")
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
set(SDL3_MAINPROJECT ON)
+11
View File
@@ -1,6 +1,17 @@
This is a list of major changes in SDL's version history.
---------------------------------------------------------------------------
3.2.22:
---------------------------------------------------------------------------
* SDL_HINT_JOYSTICK_WGI is disabled by default
---------------------------------------------------------------------------
3.2.16:
---------------------------------------------------------------------------
* SDL_HINT_JOYSTICK_RAWINPUT is disabled by default
---------------------------------------------------------------------------
3.2.10:
---------------------------------------------------------------------------
+2 -2
View File
@@ -19,10 +19,10 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.2.28</string>
<string>3.2.29</string>
<key>CFBundleSignature</key>
<string>SDLX</string>
<key>CFBundleVersion</key>
<string>3.2.28</string>
<string>3.2.29</string>
</dict>
</plist>
+4 -4
View File
@@ -3082,7 +3082,7 @@
CLANG_ENABLE_OBJC_ARC = YES;
DEPLOYMENT_POSTPROCESSING = YES;
DYLIB_COMPATIBILITY_VERSION = 201.0.0;
DYLIB_CURRENT_VERSION = 201.28.0;
DYLIB_CURRENT_VERSION = 201.29.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_ALTIVEC_EXTENSIONS = YES;
@@ -3117,7 +3117,7 @@
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 3.2.28;
MARKETING_VERSION = 3.2.29;
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
PRODUCT_NAME = SDL3;
@@ -3148,7 +3148,7 @@
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
DYLIB_COMPATIBILITY_VERSION = 201.0.0;
DYLIB_CURRENT_VERSION = 201.28.0;
DYLIB_CURRENT_VERSION = 201.29.0;
DYLIB_INSTALL_NAME_BASE = "@rpath";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
@@ -3180,7 +3180,7 @@
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.13;
MARKETING_VERSION = 3.2.28;
MARKETING_VERSION = 3.2.29;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
PRODUCT_BUNDLE_IDENTIFIER = org.libsdl.SDL3;
+1 -1
View File
@@ -1,4 +1,4 @@
Title SDL 3.2.28
Title SDL 3.2.29
Version 1
Description SDL Library for macOS (http://www.libsdl.org)
DefaultLocation /Library/Frameworks
@@ -61,7 +61,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
private static final String TAG = "SDL";
private static final int SDL_MAJOR_VERSION = 3;
private static final int SDL_MINOR_VERSION = 2;
private static final int SDL_MICRO_VERSION = 28;
private static final int SDL_MICRO_VERSION = 29;
/*
// Display InputType.SOURCE/CLASS of events and devices
//
@@ -33,9 +33,9 @@
#cmakedefine SDL_VENDOR_INFO "@SDL_VENDOR_INFO@"
#if defined(SDL_VENDOR_INFO)
#define SDL_REVISION "@<@PROJECT_REVISION@>@ (" SDL_VENDOR_INFO ")"
#define SDL_REVISION "SDL-@<@PROJECT_REVISION@>@ (" SDL_VENDOR_INFO ")"
#else
#define SDL_REVISION "@<@PROJECT_REVISION@>@"
#define SDL_REVISION "SDL-@<@PROJECT_REVISION@>@"
#endif
#endif /* SDL_revision_h_ */
@@ -48,9 +48,9 @@
*/
#define SDL_REVISION "Some arbitrary string decided at SDL build time"
#elif defined(SDL_VENDOR_INFO)
#define SDL_REVISION "@<@PROJECT_REVISION@>@ (" SDL_VENDOR_INFO ")"
#define SDL_REVISION "SDL-@<@PROJECT_REVISION@>@ (" SDL_VENDOR_INFO ")"
#else
#define SDL_REVISION "@<@PROJECT_REVISION@>@"
#define SDL_REVISION "SDL-@<@PROJECT_REVISION@>@"
#endif
#endif /* SDL_revision_h_ */
+1 -1
View File
@@ -20,7 +20,7 @@
*/
/**
* Main include header for the SDL library, version 3.2.28
* Main include header for the SDL library, version 3.2.29
*
* It is almost always best to include just this one header instead of
* picking out individual headers included here. There are exceptions to
+1 -1
View File
@@ -62,7 +62,7 @@ extern "C" {
*
* \since This macro is available since SDL 3.2.0.
*/
#define SDL_MICRO_VERSION 28
#define SDL_MICRO_VERSION 29
/**
* This macro turns the version numbers into a numeric value.
+14 -8
View File
@@ -597,15 +597,21 @@ void SDL_LogMessageV(int category, SDL_LogPriority priority, SDL_PRINTF_FORMAT_S
}
// If message truncated, allocate and re-render
if (len >= sizeof(stack_buf) && SDL_size_add_check_overflow(len, 1, &len_plus_term)) {
// Allocate exactly what we need, including the zero-terminator
message = (char *)SDL_malloc(len_plus_term);
if (!message) {
return;
if (len >= sizeof(stack_buf)) {
if (SDL_size_add_check_overflow(len, 1, &len_plus_term)) {
// Allocate exactly what we need, including the zero-terminator
message = (char *)SDL_malloc(len_plus_term);
if (!message) {
return;
}
va_copy(aq, ap);
len = SDL_vsnprintf(message, len_plus_term, fmt, aq);
va_end(aq);
} else {
// Allocation would overflow, use truncated message
message = stack_buf;
len = sizeof(stack_buf);
}
va_copy(aq, ap);
len = SDL_vsnprintf(message, len_plus_term, fmt, aq);
va_end(aq);
} else {
message = stack_buf;
}
+1 -1
View File
@@ -796,7 +796,7 @@ static void MaybeAddDevice(const char *path)
const int stepw = (int) frmsizeenum.stepwise.step_width;
const int steph = (int) frmsizeenum.stepwise.step_height;
for (int w = minw; w <= maxw; w += stepw) {
for (int h = minh; w <= maxh; w += steph) {
for (int h = minh; h <= maxh; h += steph) {
#if DEBUG_CAMERA
SDL_Log("CAMERA: * Has %s size %dx%d", (frmsizeenum.type == V4L2_FRMSIZE_TYPE_STEPWISE) ? "stepwise" : "continuous", w, h);
#endif
+4 -4
View File
@@ -9,8 +9,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,2,28,0
PRODUCTVERSION 3,2,28,0
FILEVERSION 3,2,29,0
PRODUCTVERSION 3,2,29,0
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x40004L
@@ -23,12 +23,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "SDL\0"
VALUE "FileVersion", "3, 2, 28, 0\0"
VALUE "FileVersion", "3, 2, 29, 0\0"
VALUE "InternalName", "SDL\0"
VALUE "LegalCopyright", "Copyright (C) 2025 Sam Lantinga\0"
VALUE "OriginalFilename", "SDL3.dll\0"
VALUE "ProductName", "Simple DirectMedia Layer\0"
VALUE "ProductVersion", "3, 2, 28, 0\0"
VALUE "ProductVersion", "3, 2, 29, 0\0"
END
END
BLOCK "VarFileInfo"
+16 -9
View File
@@ -5884,6 +5884,7 @@ static void D3D12_UploadToTexture(
Uint32 alignedRowPitch;
Uint32 rowsPerSlice = source->rows_per_layer;
Uint32 bytesPerSlice;
Uint32 alignedBytesPerSlice;
bool needsRealignment;
bool needsPlacementCopy;
@@ -5921,10 +5922,13 @@ static void D3D12_UploadToTexture(
bytesPerSlice = rowsPerSlice * rowPitch;
alignedRowPitch = D3D12_INTERNAL_Align(rowPitch, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT);
alignedRowPitch = BytesPerRow(destination->w, textureContainer->header.info.format);
alignedRowPitch = D3D12_INTERNAL_Align(alignedRowPitch, D3D12_TEXTURE_DATA_PITCH_ALIGNMENT);
needsRealignment = rowsPerSlice != destination->h || rowPitch != alignedRowPitch;
needsPlacementCopy = source->offset % D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT != 0;
alignedBytesPerSlice = alignedRowPitch * destination->h;
sourceLocation.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT;
sourceLocation.PlacedFootprint.Footprint.Format = SDLToD3D12_TextureFormat[textureContainer->header.info.format];
sourceLocation.PlacedFootprint.Footprint.RowPitch = alignedRowPitch;
@@ -5949,22 +5953,25 @@ static void D3D12_UploadToTexture(
for (Uint32 sliceIndex = 0; sliceIndex < destination->d; sliceIndex += 1) {
// copy row count minus one to avoid overread
for (Uint32 rowIndex = 0; rowIndex < rowsPerSlice - 1; rowIndex += 1) {
for (Uint32 rowIndex = 0; rowIndex < destination->h - 1; rowIndex += 1) {
SDL_memcpy(
temporaryBuffer->mapPointer + (sliceIndex * rowsPerSlice) + (rowIndex * alignedRowPitch),
temporaryBuffer->mapPointer + (sliceIndex * alignedBytesPerSlice) + (rowIndex * alignedRowPitch),
transferBufferContainer->activeBuffer->mapPointer + source->offset + (sliceIndex * bytesPerSlice) + (rowIndex * rowPitch),
rowPitch);
alignedRowPitch);
}
Uint32 offset = source->offset + (sliceIndex * bytesPerSlice) + ((rowsPerSlice - 1) * rowPitch);
Uint32 offset = source->offset + (sliceIndex * bytesPerSlice) + ((destination->h - 1) * rowPitch);
SDL_memcpy(
temporaryBuffer->mapPointer + (sliceIndex * rowsPerSlice) + ((rowsPerSlice - 1) * alignedRowPitch),
temporaryBuffer->mapPointer + (sliceIndex * alignedBytesPerSlice) + ((destination->h - 1) * alignedRowPitch),
transferBufferContainer->activeBuffer->mapPointer + offset,
SDL_min(alignedRowPitch, transferBufferContainer->size - offset));
sourceLocation.PlacedFootprint.Footprint.Width = destination->w;
sourceLocation.PlacedFootprint.Footprint.Height = rowsPerSlice;
sourceLocation.PlacedFootprint.Footprint.Height = destination->h;
sourceLocation.PlacedFootprint.Footprint.Depth = 1;
sourceLocation.PlacedFootprint.Offset = (sliceIndex * bytesPerSlice);
sourceLocation.PlacedFootprint.Offset = (sliceIndex * alignedBytesPerSlice);
ID3D12GraphicsCommandList_CopyTextureRegion(
d3d12CommandBuffer->graphicsCommandList,
@@ -6001,7 +6008,7 @@ static void D3D12_UploadToTexture(
sourceLocation.PlacedFootprint.Offset = 0;
sourceLocation.PlacedFootprint.Footprint.Width = destination->w;
sourceLocation.PlacedFootprint.Footprint.Height = destination->h;
sourceLocation.PlacedFootprint.Footprint.Depth = 1;
sourceLocation.PlacedFootprint.Footprint.Depth = destination->d;
ID3D12GraphicsCommandList_CopyTextureRegion(
d3d12CommandBuffer->graphicsCommandList,
-2
View File
@@ -10787,8 +10787,6 @@ static bool VULKAN_INTERNAL_DefragmentMemory(
VulkanMemoryUsedRegion *currentRegion = allocation->usedRegions[i];
if (currentRegion->isBuffer && !currentRegion->vulkanBuffer->markedForDestroy) {
currentRegion->vulkanBuffer->usage |= VK_BUFFER_USAGE_TRANSFER_DST_BIT;
VulkanBuffer *newBuffer = VULKAN_INTERNAL_CreateBuffer(
renderer,
currentRegion->vulkanBuffer->size,
+3 -1
View File
@@ -273,6 +273,7 @@ static Uint32 initial_blacklist_devices[] = {
MAKE_VIDPID(0x04d9, 0x8009), // OBINLB USB-HID Keyboard (Anne Pro II)
MAKE_VIDPID(0x04d9, 0xa292), // OBINLB USB-HID Keyboard (Anne Pro II)
MAKE_VIDPID(0x04d9, 0xa293), // OBINLB USB-HID Keyboard (Anne Pro II)
MAKE_VIDPID(0x04f2, 0xa13c), // HP Deluxe Webcam KQ246AA
MAKE_VIDPID(0x1532, 0x0266), // Razer Huntsman V2 Analog, non-functional DInput device
MAKE_VIDPID(0x1532, 0x0282), // Razer Huntsman Mini Analog, non-functional DInput device
MAKE_VIDPID(0x26ce, 0x01a2), // ASRock LED Controller
@@ -280,7 +281,8 @@ static Uint32 initial_blacklist_devices[] = {
MAKE_VIDPID(0x31e3, 0x1310), // Wooting 60HE (ARM)
MAKE_VIDPID(0x3297, 0x1969), // Moonlander MK1 Keyboard
MAKE_VIDPID(0x3434, 0x0211), // Keychron K1 Pro System Control
MAKE_VIDPID(0x04f2, 0xa13c), // HP Deluxe Webcam KQ246AA
MAKE_VIDPID(0x3434, 0x0353), // Keychron V5 System Control
MAKE_VIDPID(0x3434, 0xd030), // Keychron Link
};
static SDL_vidpid_list blacklist_devices = {
SDL_HINT_JOYSTICK_BLACKLIST_DEVICES, 0, 0, NULL,
+10 -1
View File
@@ -33,9 +33,18 @@ int main(int argc, char *argv[])
SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_MICRO_VERSION,
SDL_REVISION);
int version = SDL_GetVersion();
const char *revision = SDL_GetRevision();
SDL_Log("Runtime version: %d.%d.%d (%s)",
SDL_VERSIONNUM_MAJOR(version), SDL_VERSIONNUM_MINOR(version), SDL_VERSIONNUM_MICRO(version),
SDL_GetRevision());
revision);
/* This is not an API guarantee, but we try to make sure it's true,
* so that the version number can be extracted while debugging with:
* strings libSDL3.so.0 | grep SDL-
*/
if (SDL_strncmp(revision, "SDL-", 4) != 0) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Revision should start with SDL-");
return 1;
}
SDL_Quit();
return 0;
}