From 53c022c8807ab0a16cd9f1546bbb0b98e0b0e25c Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 1 Mar 2025 18:13:50 -0800 Subject: [PATCH 01/11] Updated to version 2.32.3 for development --- CMakeLists.txt | 2 +- Makefile.os2 | 2 +- Makefile.w32 | 2 +- Xcode/SDL/Info-Framework.plist | 4 ++-- Xcode/SDL/SDL.xcodeproj/project.pbxproj | 12 ++++++------ Xcode/SDL/pkg-support/SDL.info | 2 +- .../src/main/java/org/libsdl/app/SDLActivity.java | 2 +- configure | 2 +- configure.ac | 2 +- include/SDL_version.h | 2 +- src/main/windows/version.rc | 8 ++++---- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8baa8a50ebe53..2b05ebeb89d97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,7 +89,7 @@ endif() # See docs/release_checklist.md set(SDL_MAJOR_VERSION 2) set(SDL_MINOR_VERSION 32) -set(SDL_MICRO_VERSION 2) +set(SDL_MICRO_VERSION 3) set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}") # Set defaults preventing destination file conflicts diff --git a/Makefile.os2 b/Makefile.os2 index d0fde2f363107..9885629b3d256 100644 --- a/Makefile.os2 +++ b/Makefile.os2 @@ -15,7 +15,7 @@ LIBNAME = SDL2 MAJOR_VERSION = 2 MINOR_VERSION = 32 -MICRO_VERSION = 2 +MICRO_VERSION = 3 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION) DESCRIPTION = Simple DirectMedia Layer 2 diff --git a/Makefile.w32 b/Makefile.w32 index 59f8061436f17..40dbb4bd1f077 100644 --- a/Makefile.w32 +++ b/Makefile.w32 @@ -6,7 +6,7 @@ LIBNAME = SDL2 MAJOR_VERSION = 2 MINOR_VERSION = 32 -MICRO_VERSION = 2 +MICRO_VERSION = 3 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION) LIBHOME = . diff --git a/Xcode/SDL/Info-Framework.plist b/Xcode/SDL/Info-Framework.plist index 6c6dff596a542..b3ee7e36817e8 100644 --- a/Xcode/SDL/Info-Framework.plist +++ b/Xcode/SDL/Info-Framework.plist @@ -19,10 +19,10 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.32.2 + 2.32.3 CFBundleSignature SDLX CFBundleVersion - 2.32.2 + 2.32.3 diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj index 30caa03bb689f..0bdfaeaf1d286 100644 --- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj +++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj @@ -9729,7 +9729,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEPLOYMENT_POSTPROCESSING = YES; DYLIB_COMPATIBILITY_VERSION = 3201.0.0; - DYLIB_CURRENT_VERSION = 3201.2.0; + DYLIB_CURRENT_VERSION = 3201.3.0; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_ALTIVEC_EXTENSIONS = YES; @@ -9770,7 +9770,7 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_LINK_OBJC_RUNTIME = NO; - MARKETING_VERSION = 2.32.2; + MARKETING_VERSION = 2.32.3; OTHER_LDFLAGS = "-liconv"; }; name = Release; @@ -9814,7 +9814,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 3201.0.0; - DYLIB_CURRENT_VERSION = 3201.2.0; + DYLIB_CURRENT_VERSION = 3201.3.0; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -9856,7 +9856,7 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_LINK_OBJC_RUNTIME = NO; - MARKETING_VERSION = 2.32.2; + MARKETING_VERSION = 2.32.3; OTHER_LDFLAGS = "-liconv"; }; name = Debug; @@ -10063,7 +10063,7 @@ DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 3201.0.0; - DYLIB_CURRENT_VERSION = 3201.2.0; + DYLIB_CURRENT_VERSION = 3201.3.0; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; @@ -10115,7 +10115,7 @@ DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 3201.0.0; - DYLIB_CURRENT_VERSION = 3201.2.0; + DYLIB_CURRENT_VERSION = 3201.3.0; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu11; diff --git a/Xcode/SDL/pkg-support/SDL.info b/Xcode/SDL/pkg-support/SDL.info index fedf62caa5974..730bbc7bf1d91 100644 --- a/Xcode/SDL/pkg-support/SDL.info +++ b/Xcode/SDL/pkg-support/SDL.info @@ -1,4 +1,4 @@ -Title SDL 2.32.2 +Title SDL 2.32.3 Version 1 Description SDL Library for Mac OS X (http://www.libsdl.org) DefaultLocation /Library/Frameworks diff --git a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java index c1c4c661f3621..abe28bc892222 100644 --- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java +++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java @@ -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 = 2; private static final int SDL_MINOR_VERSION = 32; - private static final int SDL_MICRO_VERSION = 2; + private static final int SDL_MICRO_VERSION = 3; /* // Display InputType.SOURCE/CLASS of events and devices // diff --git a/configure b/configure index bcfeead98911c..fb09deb37791d 100755 --- a/configure +++ b/configure @@ -3516,7 +3516,7 @@ orig_CFLAGS="$CFLAGS" # See docs/release_checklist.md SDL_MAJOR_VERSION=2 SDL_MINOR_VERSION=32 -SDL_MICRO_VERSION=2 +SDL_MICRO_VERSION=3 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION` diff --git a/configure.ac b/configure.ac index 146d56f93e237..76208a72aceec 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ dnl Set various version strings - taken gratefully from the GTk sources # See docs/release_checklist.md SDL_MAJOR_VERSION=2 SDL_MINOR_VERSION=32 -SDL_MICRO_VERSION=2 +SDL_MICRO_VERSION=3 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION` diff --git a/include/SDL_version.h b/include/SDL_version.h index 0465020776924..135d019ec35e1 100644 --- a/include/SDL_version.h +++ b/include/SDL_version.h @@ -58,7 +58,7 @@ typedef struct SDL_version */ #define SDL_MAJOR_VERSION 2 #define SDL_MINOR_VERSION 32 -#define SDL_PATCHLEVEL 2 +#define SDL_PATCHLEVEL 3 /** * Macro to determine SDL version program was compiled against. diff --git a/src/main/windows/version.rc b/src/main/windows/version.rc index 28a6a0669114b..0625ae78f6555 100644 --- a/src/main/windows/version.rc +++ b/src/main/windows/version.rc @@ -9,8 +9,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,32,2,0 - PRODUCTVERSION 2,32,2,0 + FILEVERSION 2,32,3,0 + PRODUCTVERSION 2,32,3,0 FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x40004L @@ -23,12 +23,12 @@ BEGIN BEGIN VALUE "CompanyName", "\0" VALUE "FileDescription", "SDL\0" - VALUE "FileVersion", "2, 32, 2, 0\0" + VALUE "FileVersion", "2, 32, 3, 0\0" VALUE "InternalName", "SDL\0" VALUE "LegalCopyright", "Copyright (C) 2025 Sam Lantinga\0" VALUE "OriginalFilename", "SDL2.dll\0" VALUE "ProductName", "Simple DirectMedia Layer\0" - VALUE "ProductVersion", "2, 32, 2, 0\0" + VALUE "ProductVersion", "2, 32, 3, 0\0" END END BLOCK "VarFileInfo" From 9e079fe9c7931738ed63d257b1d7fb8a07b66824 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Mon, 10 Feb 2025 05:00:56 -0500 Subject: [PATCH 02/11] pipewire: Ensure that the correct struct is used for enumeration APIs PipeWire now requires the correct struct type is used, otherwise it will fail to compile. Reference: https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/188d920733f0791413d3386e5536ee7377f71b2f Fixes: https://github.com/libsdl-org/SDL/issues/12224 (cherry picked from commit d35bef64e913dd7d5dd3153a4b61f10ef837dad6) (cherry picked from commit 6be87ceb33a9aad3bf5204bb13b3a5e8b498fd26) --- src/audio/pipewire/SDL_pipewire.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/pipewire/SDL_pipewire.c b/src/audio/pipewire/SDL_pipewire.c index 889e05decb293..5d1bfc28dedb7 100644 --- a/src/audio/pipewire/SDL_pipewire.c +++ b/src/audio/pipewire/SDL_pipewire.c @@ -590,7 +590,7 @@ static void node_event_info(void *object, const struct pw_node_info *info) /* Need to parse the parameters to get the sample rate */ for (i = 0; i < info->n_params; ++i) { - pw_node_enum_params(node->proxy, 0, info->params[i].id, 0, 0, NULL); + pw_node_enum_params((struct pw_node*)node->proxy, 0, info->params[i].id, 0, 0, NULL); } hotplug_core_sync(node); From e9d2f60e1cc9233177e11f8be689a2235516946d Mon Sep 17 00:00:00 2001 From: SDL Wiki Bot Date: Fri, 7 Mar 2025 17:02:06 +0000 Subject: [PATCH 03/11] Sync SDL2 wiki -> header [ci skip] (cherry picked from commit 22a87a22ca02e826f5c9c2c8e7c48fa2cd8150d4) --- include/SDL_render.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/SDL_render.h b/include/SDL_render.h index 2118ed99cc8bc..b5a70f3520bca 100644 --- a/include/SDL_render.h +++ b/include/SDL_render.h @@ -787,7 +787,7 @@ extern DECLSPEC int SDLCALL SDL_SetRenderTarget(SDL_Renderer *renderer, * Get the current render target. * * The default render target is the window for which the renderer was created, - * and is reported a NULL here. + * and is reported as NULL here. * * \param renderer the rendering context. * \returns the current render target or NULL for the default render target. From f08a5cfcab242730ec541718ec59594a1c2c7bd8 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 10 Mar 2025 14:25:11 -0700 Subject: [PATCH 04/11] Fixed sscanf("026", "%1x%1x%1x", &r, &g, &b) Fixes https://github.com/libsdl-org/SDL/issues/12510 (cherry picked from commit be6ed6e9c4c74f1973597214517ac3f8f89feb85) (cherry picked from commit 1caae3e9e448e9ec728faa9b13e058f5d63189e0) --- src/stdlib/SDL_string.c | 12 +++++------- test/testautomation_stdlib.c | 12 ++++++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c index 2ce22186e3c56..38b5201c624a0 100644 --- a/src/stdlib/SDL_string.c +++ b/src/stdlib/SDL_string.c @@ -81,14 +81,12 @@ static size_t SDL_ScanUnsignedLongLongInternal(const char *text, int count, int negative = *text == '-'; ++text; } - if ((radix == 0 || radix == 16) && *text == '0' && text[1] != '\0') { + if ((radix == 0 || radix == 16) && *text == '0' && (text[1] == 'x' || text[1] == 'X')) { + text += 2; + radix = 16; + } else if (radix == 0 && *text == '0' && (text[1] >= '0' && text[1] <= '9')) { ++text; - if (*text == 'x' || *text == 'X') { - radix = 16; - ++text; - } else if (radix == 0) { - radix = 8; - } + radix = 8; } else if (radix == 0) { radix = 10; } diff --git a/test/testautomation_stdlib.c b/test/testautomation_stdlib.c index e62069da4b1ae..b83d9a1ea37a0 100644 --- a/test/testautomation_stdlib.c +++ b/test/testautomation_stdlib.c @@ -412,6 +412,7 @@ int stdlib_sscanf(void *arg) long long long_long_output, expected_long_long_output, long_long_length; size_t size_output, expected_size_output; char text[128], text2[128]; + unsigned int r = 0, g = 0, b = 0; expected_output = output = 123; expected_result = -1; @@ -447,6 +448,17 @@ int stdlib_sscanf(void *arg) SDLTest_AssertCheck(expected_result == result, "Check return value, expected: %i, got: %i", expected_result, result); SDLTest_AssertCheck(length == 1, "Check length, expected: 1, got: %i", length); + expected_result = 3; + result = SDL_sscanf("#026", "#%1x%1x%1x", &r, &g, &b); + SDLTest_AssertPass("Call to SDL_sscanf(\"#026\", \"#%%1x%%1x%%1x\", &r, &g, &b)"); + expected_output = 0; + SDLTest_AssertCheck(r == expected_output, "Check output for r, expected: %i, got: %i", expected_output, r); + expected_output = 2; + SDLTest_AssertCheck(g == expected_output, "Check output for g, expected: %i, got: %i", expected_output, g); + expected_output = 6; + SDLTest_AssertCheck(b == expected_output, "Check output for b, expected: %i, got: %i", expected_output, b); + SDLTest_AssertCheck(expected_result == result, "Check return value, expected: %i, got: %i", expected_result, result); + #define SIZED_TEST_CASE(type, var, printf_specifier, scanf_specifier) \ var##_output = 123; \ var##_length = 0; \ From c8c4c9772758de2ae466d27f13eb3ed4233e3f32 Mon Sep 17 00:00:00 2001 From: SDL Wiki Bot Date: Wed, 12 Mar 2025 19:23:45 +0000 Subject: [PATCH 05/11] Sync SDL2 wiki -> header [ci skip] (cherry picked from commit fc536dcb7eac0f97a794ff8c0baf9a69c3ea5f06) --- include/SDL_render.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/SDL_render.h b/include/SDL_render.h index b5a70f3520bca..5274172179d33 100644 --- a/include/SDL_render.h +++ b/include/SDL_render.h @@ -244,7 +244,7 @@ extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateRenderer(SDL_Window * window, * \since This function is available since SDL 2.0.0. * * \sa SDL_CreateRenderer - * \sa SDL_CreateWindowRenderer + * \sa SDL_CreateWindowAndRenderer * \sa SDL_DestroyRenderer */ extern DECLSPEC SDL_Renderer * SDLCALL SDL_CreateSoftwareRenderer(SDL_Surface * surface); From d3bb91522f4ea936318596662b86cd872884d365 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 17 Mar 2025 09:46:27 -0700 Subject: [PATCH 06/11] Fixed crash if info->path is NULL (cherry picked from commit 715301cef5835b14c37267055e13a6b02d66ab1a) (cherry picked from commit 46a51b42983ff07d8e49b0365e108a8ed85d7004) --- src/joystick/hidapi/SDL_hidapijoystick.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/joystick/hidapi/SDL_hidapijoystick.c b/src/joystick/hidapi/SDL_hidapijoystick.c index b839ef79c7386..62e3633f6b29d 100644 --- a/src/joystick/hidapi/SDL_hidapijoystick.c +++ b/src/joystick/hidapi/SDL_hidapijoystick.c @@ -890,10 +890,8 @@ static SDL_HIDAPI_Device *HIDAPI_AddDevice(const struct SDL_hid_device_info *inf return NULL; } device->magic = &SDL_HIDAPI_device_magic; - device->path = SDL_strdup(info->path); - if (!device->path) { - SDL_free(device); - return NULL; + if (info->path) { + device->path = SDL_strdup(info->path); } device->seen = SDL_TRUE; device->vendor_id = info->vendor_id; From 9b048e73a2e860d5bf7758b80150df0c7cbc43f3 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 17 Mar 2025 13:54:56 -0700 Subject: [PATCH 07/11] Fixed raw input device GUIDs changing randomly between runs On Windows 11, apparently HidD_GetManufacturerString() and HidD_GetProductString() can return TRUE without actually filling in any string data. Fixes https://github.com/libsdl-org/SDL/issues/12566 (cherry picked from commit 4fc9509ab776ffe535320ea3b1296ecfdea2c32f) (cherry picked from commit 52146cf067ae950b1d431a84766fc7d0501f536a) --- src/joystick/windows/SDL_rawinputjoystick.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/joystick/windows/SDL_rawinputjoystick.c b/src/joystick/windows/SDL_rawinputjoystick.c index 9728780ac2350..cd958b1ff9eb0 100644 --- a/src/joystick/windows/SDL_rawinputjoystick.c +++ b/src/joystick/windows/SDL_rawinputjoystick.c @@ -908,9 +908,11 @@ static void RAWINPUT_AddDevice(HANDLE hDevice) char *product_string = NULL; WCHAR string[128]; + string[0] = 0; if (SDL_HidD_GetManufacturerString(hFile, string, sizeof(string))) { manufacturer_string = WIN_StringToUTF8W(string); } + string[0] = 0; if (SDL_HidD_GetProductString(hFile, string, sizeof(string))) { product_string = WIN_StringToUTF8W(string); } From 3f6efbf2df1ba8c344695eaf789e2490192335a2 Mon Sep 17 00:00:00 2001 From: Dragon-Baroque <74261498+Dragon-Baroque@users.noreply.github.com> Date: Wed, 19 Mar 2025 23:39:53 +0100 Subject: [PATCH 08/11] The posix4 library has been merged into the libc library Backported from commit 07e4dea6934f84f937e904ef195666011e269473. Reference issue: https://github.com/libsdl-org/SDL/issues/12588. (cherry picked from commit d63b3376a4fc2d5e8de8d0e0d0bca4d0da4f8f2e) --- cmake/sdlchecks.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake index ac36cfa2d7ed1..ea4c0ff4300ea 100644 --- a/cmake/sdlchecks.cmake +++ b/cmake/sdlchecks.cmake @@ -966,7 +966,7 @@ macro(CheckPTHREAD) if(CMAKE_C_COMPILER_ID MATCHES "SunPro") set(PTHREAD_LDFLAGS "-mt -lpthread") else() - set(PTHREAD_LDFLAGS "-pthread -lposix4") + set(PTHREAD_LDFLAGS "-pthread") endif() elseif(SYSV5) set(PTHREAD_CFLAGS "-D_REENTRANT -Kthread") From 2708e08f40933d57aee0ba5f3406f1f75f3d9f55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl=20=C3=85stholm?= Date: Sun, 16 Mar 2025 18:43:19 +0100 Subject: [PATCH 09/11] emscripten: Don't use legacy JS library functions for assertions (cherry picked from commit 54f5b73333c6fb067af37f976718a5fef8890931) (cherry picked from commit a8f0eb4c330526d48dc40f611eb4f2881f32fa3a) --- src/SDL_assert.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/src/SDL_assert.c b/src/SDL_assert.c index 76c7491fa7dce..99a376e948ca8 100644 --- a/src/SDL_assert.c +++ b/src/SDL_assert.c @@ -42,15 +42,7 @@ #endif #if defined(__EMSCRIPTEN__) - #include - /* older Emscriptens don't have this, but we need to for wasm64 compatibility. */ - #ifndef MAIN_THREAD_EM_ASM_PTR - #ifdef __wasm64__ - #error You need to upgrade your Emscripten compiler to support wasm64 - #else - #define MAIN_THREAD_EM_ASM_PTR MAIN_THREAD_EM_ASM_INT - #endif - #endif +#include #endif /* The size of the stack buffer to use for rendering assert messages. */ @@ -259,7 +251,7 @@ static SDL_assert_state SDLCALL SDL_PromptAssertion(const SDL_assert_data *data, for (;;) { SDL_bool okay = SDL_TRUE; /* *INDENT-OFF* */ /* clang-format off */ - char *buf = (char *) MAIN_THREAD_EM_ASM_PTR({ + int reply = MAIN_THREAD_EM_ASM_INT({ var str = UTF8ToString($0) + '\n\n' + 'Abort/Retry/Ignore/AlwaysIgnore? [ariA] :'; @@ -267,26 +259,31 @@ static SDL_assert_state SDLCALL SDL_PromptAssertion(const SDL_assert_data *data, if (reply === null) { reply = "i"; } - return allocate(intArrayFromString(reply), 'i8', ALLOC_NORMAL); + return reply.length === 1 ? reply.charCodeAt(0) : -1; }, message); /* *INDENT-ON* */ /* clang-format on */ - if (SDL_strcmp(buf, "a") == 0) { + switch (reply) { + case 'a': state = SDL_ASSERTION_ABORT; #if 0 /* (currently) no break functionality on Emscripten */ - } else if (SDL_strcmp(buf, "b") == 0) { + case 'b': state = SDL_ASSERTION_BREAK; + break; #endif - } else if (SDL_strcmp(buf, "r") == 0) { + case 'r': state = SDL_ASSERTION_RETRY; - } else if (SDL_strcmp(buf, "i") == 0) { + break; + case 'i': state = SDL_ASSERTION_IGNORE; - } else if (SDL_strcmp(buf, "A") == 0) { + break; + case 'A': state = SDL_ASSERTION_ALWAYS_IGNORE; - } else { + break; + default: okay = SDL_FALSE; + break; } - free(buf); if (okay) { break; From b2a95b2482cbe1c7835c08d60bd5826df3e21e33 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 25 Mar 2025 09:07:10 -0700 Subject: [PATCH 10/11] Default SDL_HINT_ACCELEROMETER_AS_JOYSTICK to 0 on Linux The Linux joystick driver supports associating sensor devices with the related controller device, so enable that by default. Fixes https://github.com/libsdl-org/SDL/issues/12043 (cherry picked from commit 3e47181800d7f97c8b1c9784146ddfb71f7637d3) --- src/core/linux/SDL_udev.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/core/linux/SDL_udev.c b/src/core/linux/SDL_udev.c index 06eefa31f500a..6c0fc14da2213 100644 --- a/src/core/linux/SDL_udev.c +++ b/src/core/linux/SDL_udev.c @@ -424,9 +424,12 @@ static int device_class(struct udev_device *dev) } val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_ACCELEROMETER"); - if (SDL_GetHintBoolean(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, SDL_TRUE) && - val && SDL_strcmp(val, "1") == 0) { - devclass |= SDL_UDEV_DEVICE_JOYSTICK; + if (val && SDL_strcmp(val, "1") == 0) { + if (SDL_GetHintBoolean(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, SDL_FALSE)) { + devclass |= SDL_UDEV_DEVICE_JOYSTICK; + } else { + devclass |= SDL_UDEV_DEVICE_ACCELEROMETER; + } } val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_MOUSE"); From 2359383fc187386204c3bb22de89655a494cd128 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 31 Mar 2025 09:12:51 -0700 Subject: [PATCH 11/11] Updated to version 2.32.4 for release --- CMakeLists.txt | 2 +- Makefile.os2 | 2 +- Makefile.w32 | 2 +- Xcode/SDL/Info-Framework.plist | 4 ++-- Xcode/SDL/SDL.xcodeproj/project.pbxproj | 12 ++++++------ Xcode/SDL/pkg-support/SDL.info | 2 +- .../src/main/java/org/libsdl/app/SDLActivity.java | 2 +- configure | 2 +- configure.ac | 2 +- include/SDL_version.h | 2 +- src/main/windows/version.rc | 8 ++++---- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b05ebeb89d97..d452f6c264cd9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,7 +89,7 @@ endif() # See docs/release_checklist.md set(SDL_MAJOR_VERSION 2) set(SDL_MINOR_VERSION 32) -set(SDL_MICRO_VERSION 3) +set(SDL_MICRO_VERSION 4) set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}") # Set defaults preventing destination file conflicts diff --git a/Makefile.os2 b/Makefile.os2 index 9885629b3d256..74702555090a2 100644 --- a/Makefile.os2 +++ b/Makefile.os2 @@ -15,7 +15,7 @@ LIBNAME = SDL2 MAJOR_VERSION = 2 MINOR_VERSION = 32 -MICRO_VERSION = 3 +MICRO_VERSION = 4 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION) DESCRIPTION = Simple DirectMedia Layer 2 diff --git a/Makefile.w32 b/Makefile.w32 index 40dbb4bd1f077..aeabc83f7eab3 100644 --- a/Makefile.w32 +++ b/Makefile.w32 @@ -6,7 +6,7 @@ LIBNAME = SDL2 MAJOR_VERSION = 2 MINOR_VERSION = 32 -MICRO_VERSION = 3 +MICRO_VERSION = 4 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION) LIBHOME = . diff --git a/Xcode/SDL/Info-Framework.plist b/Xcode/SDL/Info-Framework.plist index b3ee7e36817e8..80e07697f3e0a 100644 --- a/Xcode/SDL/Info-Framework.plist +++ b/Xcode/SDL/Info-Framework.plist @@ -19,10 +19,10 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.32.3 + 2.32.4 CFBundleSignature SDLX CFBundleVersion - 2.32.3 + 2.32.4 diff --git a/Xcode/SDL/SDL.xcodeproj/project.pbxproj b/Xcode/SDL/SDL.xcodeproj/project.pbxproj index 0bdfaeaf1d286..9bc1ef9b8252c 100644 --- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj +++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj @@ -9729,7 +9729,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEPLOYMENT_POSTPROCESSING = YES; DYLIB_COMPATIBILITY_VERSION = 3201.0.0; - DYLIB_CURRENT_VERSION = 3201.3.0; + DYLIB_CURRENT_VERSION = 3201.4.0; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_ALTIVEC_EXTENSIONS = YES; @@ -9770,7 +9770,7 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_LINK_OBJC_RUNTIME = NO; - MARKETING_VERSION = 2.32.3; + MARKETING_VERSION = 2.32.4; OTHER_LDFLAGS = "-liconv"; }; name = Release; @@ -9814,7 +9814,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 3201.0.0; - DYLIB_CURRENT_VERSION = 3201.3.0; + DYLIB_CURRENT_VERSION = 3201.4.0; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -9856,7 +9856,7 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_LINK_OBJC_RUNTIME = NO; - MARKETING_VERSION = 2.32.3; + MARKETING_VERSION = 2.32.4; OTHER_LDFLAGS = "-liconv"; }; name = Debug; @@ -10063,7 +10063,7 @@ DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 3201.0.0; - DYLIB_CURRENT_VERSION = 3201.3.0; + DYLIB_CURRENT_VERSION = 3201.4.0; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; @@ -10115,7 +10115,7 @@ DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 3201.0.0; - DYLIB_CURRENT_VERSION = 3201.3.0; + DYLIB_CURRENT_VERSION = 3201.4.0; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu11; diff --git a/Xcode/SDL/pkg-support/SDL.info b/Xcode/SDL/pkg-support/SDL.info index 730bbc7bf1d91..503e1de91fac7 100644 --- a/Xcode/SDL/pkg-support/SDL.info +++ b/Xcode/SDL/pkg-support/SDL.info @@ -1,4 +1,4 @@ -Title SDL 2.32.3 +Title SDL 2.32.4 Version 1 Description SDL Library for Mac OS X (http://www.libsdl.org) DefaultLocation /Library/Frameworks diff --git a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java index abe28bc892222..4bd92e27494af 100644 --- a/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java +++ b/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java @@ -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 = 2; private static final int SDL_MINOR_VERSION = 32; - private static final int SDL_MICRO_VERSION = 3; + private static final int SDL_MICRO_VERSION = 4; /* // Display InputType.SOURCE/CLASS of events and devices // diff --git a/configure b/configure index fb09deb37791d..107c69081b7f0 100755 --- a/configure +++ b/configure @@ -3516,7 +3516,7 @@ orig_CFLAGS="$CFLAGS" # See docs/release_checklist.md SDL_MAJOR_VERSION=2 SDL_MINOR_VERSION=32 -SDL_MICRO_VERSION=3 +SDL_MICRO_VERSION=4 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION` diff --git a/configure.ac b/configure.ac index 76208a72aceec..eb006176a46b2 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ dnl Set various version strings - taken gratefully from the GTk sources # See docs/release_checklist.md SDL_MAJOR_VERSION=2 SDL_MINOR_VERSION=32 -SDL_MICRO_VERSION=3 +SDL_MICRO_VERSION=4 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION` diff --git a/include/SDL_version.h b/include/SDL_version.h index 135d019ec35e1..1b57c9a3a5ffc 100644 --- a/include/SDL_version.h +++ b/include/SDL_version.h @@ -58,7 +58,7 @@ typedef struct SDL_version */ #define SDL_MAJOR_VERSION 2 #define SDL_MINOR_VERSION 32 -#define SDL_PATCHLEVEL 3 +#define SDL_PATCHLEVEL 4 /** * Macro to determine SDL version program was compiled against. diff --git a/src/main/windows/version.rc b/src/main/windows/version.rc index 0625ae78f6555..a8861af3dd2ac 100644 --- a/src/main/windows/version.rc +++ b/src/main/windows/version.rc @@ -9,8 +9,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,32,3,0 - PRODUCTVERSION 2,32,3,0 + FILEVERSION 2,32,4,0 + PRODUCTVERSION 2,32,4,0 FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x40004L @@ -23,12 +23,12 @@ BEGIN BEGIN VALUE "CompanyName", "\0" VALUE "FileDescription", "SDL\0" - VALUE "FileVersion", "2, 32, 3, 0\0" + VALUE "FileVersion", "2, 32, 4, 0\0" VALUE "InternalName", "SDL\0" VALUE "LegalCopyright", "Copyright (C) 2025 Sam Lantinga\0" VALUE "OriginalFilename", "SDL2.dll\0" VALUE "ProductName", "Simple DirectMedia Layer\0" - VALUE "ProductVersion", "2, 32, 3, 0\0" + VALUE "ProductVersion", "2, 32, 4, 0\0" END END BLOCK "VarFileInfo"