Commit Graph

12381 Commits

Author SHA1 Message Date
Sam Lantinga 45b01d16b1 Fixed reliability of initializing Switch controllers on macOS
It looks like both macOS (15.1.1) and SDL are trying to talk to the controller at the same time, which can cause interleaved replies or even locking up the controller. Waiting a bit before talking to the controller seems to take care of this.
2025-04-28 20:21:53 -07:00
SternXD 433810c58d SDL2: Update from Visual Studio 2019 to Visual Studio 2022 2025-04-22 20:59:26 -07:00
SDL Wiki Bot 916ddb1ef8 Sync SDL2 wiki -> header
[ci skip]
2025-04-22 21:18:56 +00:00
Sam Lantinga 1c75cb4f8a Revert "Sync SDL2 wiki -> header"
This reverts commit 26e946ef08.

Stop it Skynet!
2025-04-22 14:17:22 -07:00
SDL Wiki Bot 26e946ef08 Sync SDL2 wiki -> header
[ci skip]
2025-04-22 17:22:42 +00:00
Petar Popovic 035518d065 SDL_BlitSurface() comment: only dstrect is modified in function 2025-04-22 10:22:27 -07:00
Boris I. Bendovsky 40b1eac541 [SDL2] Fix using of DXSDK_DIR in older CMake
- Remove duplicate 'dollar' symbol in the path
- Use command 'file' to normalize file paths
2025-04-22 10:12:01 -07:00
Ozkan Sezer bfab0a968f SDL_cpuinfo.h: only include immintrin.h for x86 targets.
Reference issue: https://github.com/libsdl-org/SDL_image/issues/537
Reference issue: https://github.com/libsdl-org/SDL_mixer/issues/648
2025-04-03 18:55:04 +03:00
Sam Lantinga f0a8e09f7c Skip the Jack audio server test
The Jack server might not be running even though the libraries are installed.
2025-03-30 21:31:38 -07:00
SDL Wiki Bot 2e4c12cd2c Sync SDL2 wiki -> header
[ci skip]
2025-03-27 19:20:39 +00:00
Sam Lantinga 3e47181800 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
2025-03-25 09:07:10 -07:00
Anonymous Maarten 8436ce98b4 tests: port failing SDL_Renderer test from pysdl2 to testautomation 2025-03-21 00:55:52 +01:00
Carl Åstholm a8f0eb4c33 emscripten: Don't use legacy JS library functions for assertions
(cherry picked from commit 54f5b73333)
2025-03-20 16:36:02 -07:00
Anonymous Maarten 069eb012aa tests: port failing SDL subsystem test from pysdl2 to testautomation 2025-03-20 20:30:18 +01:00
Anonymous Maarten 7d8a6f1603 tests: port failing SDL_Renderer test from pysdl2 to testautomation 2025-03-20 20:30:18 +01:00
Dragon-Baroque d63b3376a4 The posix4 library has been merged into the libc library
Backported from commit 07e4dea693.
Reference issue: https://github.com/libsdl-org/SDL/issues/12588.
2025-03-20 09:47:20 +03:00
Sam Lantinga 52146cf067 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 4fc9509ab7)
2025-03-17 13:57:35 -07:00
Sam Lantinga 46a51b4298 Fixed crash if info->path is NULL
(cherry picked from commit 715301cef5)
2025-03-17 09:47:53 -07:00
Anonymous Maarten 4f488b9be2 tests: port failing window test from pysdl2 to testautomation 2025-03-16 18:15:16 -07:00
Anonymous Maarten f48a96a976 test: actually run rect tests 2025-03-14 21:40:31 +01:00
Anonymous Maarten 39bb71c442 tests: port failing SDL_Rect tests from pysdl2 to testautomation 2025-03-14 17:29:27 +01:00
Anonymous Maarten 177fb9cb6c tests: port failing SDL_Hint tests from pysdl2 to testautomation 2025-03-14 17:29:27 +01:00
SDL Wiki Bot fc536dcb7e Sync SDL2 wiki -> header
[ci skip]
2025-03-12 19:23:45 +00:00
Sam Lantinga 1caae3e9e4 Fixed sscanf("026", "%1x%1x%1x", &r, &g, &b)
Fixes https://github.com/libsdl-org/SDL/issues/12510

(cherry picked from commit be6ed6e9c4)
2025-03-10 15:45:31 -07:00
SDL Wiki Bot 22a87a22ca Sync SDL2 wiki -> header
[ci skip]
2025-03-07 17:02:06 +00:00
Neal Gompa 6be87ceb33
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: 188d920733

Fixes: https://github.com/libsdl-org/SDL/issues/12224
(cherry picked from commit d35bef64e9)
2025-03-06 14:36:44 -05:00
Sam Lantinga ab44451578 Added support for the "%n" sscanf format specifier
(cherry picked from commit 6980325310)
2025-02-25 08:07:33 -08:00
SDL Wiki Bot 52ac07d327 Sync SDL2 wiki -> header
[ci skip]
2025-02-25 15:55:15 +00:00
Tomasz Pakuła 0809be4ec5 [SDL2] Add SDL_HINT_JOYSTICK_HAPTIC_AXES
Allows users to overwrite the number of haptic axes defined for a given
joystick. Also supports a "wildcard" VID:PID of 0xFFFF/0xFFFF
2025-02-25 07:54:59 -08:00
Petter Reinholdtsen 24693ac285 Changed PULSEAUDIO_FlushRecording() to only flush audio present when called.
When the flushing is not able to keep up with the audio stream coming in,
it will end up flushing forever and block API clients from getting any audio.

Fixes #9706
2025-02-24 07:31:06 -08:00
Cameron Gutman 92cadaf917 keyboard: Fix comment regarding implicit calls to SDL_StartTextInput()
It was always done inside SDL_VideoInit().
2025-02-23 19:00:32 -06:00
Anonymous Maarten d2eb72fd14 ci: drop classic Intel compiler
1) The classic Intel compiler is depreated in favor of the oneapi compiler
2) SPA_FALLTHROUGH is used in pipewire's spa/utils/json.h, and causes build errors
2025-02-23 21:26:10 +01:00
Anonymous Maarten b4d733619a ci: GitHub is retiring Ubuntu 20.04 support
backport of 8d3db06ff2
2025-02-23 19:45:27 +01:00
Anonymous Maarten ed2c004c8a ci: clang32 on msys2 is EOL
backport of 70f657e520
2025-02-23 19:40:38 +01:00
Paper 6421f12d7f thread/windows: fix stack overflow in exception naming
(cherry picked from commit 1a853973ab)
2025-02-20 08:20:41 -08:00
Ozkan Sezer ee49025f80 dynapi: use DosScanEnv() for os/2. 2025-02-20 11:50:04 +03:00
Sam Lantinga 5925c27efb Don't leak device handle in macOS 10.10 or newer
Merged upstream fix for macOS:
cdc473dfe4

In one of the early versions of macOS, when you try to close the device
with IOHIDDeviceClose() that is being physically disconnected.
Starting with some version of macOS, this crash bug was fixed,
and starting with macSO 10.15 the opposite effect took place:
in some environments crash happens if IOHIDDeviceClose() is _not_ called.

This patch is to keep a workaround for old versions of macOS,
and don't have a leak in new/tested environments.

Fixes https://github.com/libsdl-org/SDL/issues/12255
2025-02-19 16:55:03 -08:00
Sam Clegg aa00738a21 Fix SDL_emscriptenaudio.c under wasm64
Verified locally by running `browser64.test_sdl2_mixer_wav` in
emscripten.
2025-02-18 13:53:58 -08:00
Sam Lantinga 5330041ea9 Updated to version 2.33.0 for development 2025-02-08 09:15:11 -08:00
Sam Lantinga 7a44b1ab00 Updated to version 2.32.0 for release 2025-02-08 09:10:22 -08:00
Sam Lantinga 3e97d41da4 Updated to version 2.31.1 for RC build 2025-02-08 08:56:53 -08:00
ds-sloth dab0205174 Delete src/thread/n3ds/SDL_syscond.c 2025-02-06 18:12:31 -08:00
Ryan C. Gordon d2693d4c7d
dynapi: Don't use SDL_getenv; it might malloc before the app sets an allocator.
Use platform-specific code instead, so SDL's allocator never comes into play.
2025-02-06 12:40:13 -05:00
Sam Lantinga ed7e7edb70 Don't use the HIDAPI driver for Thrustmaster wheels
Closes https://github.com/libsdl-org/SDL/pull/12173

(cherry picked from commit 6782cfe2c5)
2025-02-05 17:21:48 -08:00
Thomas Bernard 466cedc0da fix: in sdl2.pc libdir was changed to prefix
(cherry picked from commit 9464f334b5)
2025-02-05 07:49:11 -08:00
Thomas Bernard b84adb3720 fix: do note assume "make", use $(MAKE)
(cherry picked from commit 1c9643249d)
2025-02-05 07:49:11 -08:00
Sam Lantinga 2847273885 Fixed mis-cherry-pick 2025-02-01 11:03:33 -08:00
Anonymous Maarten 799ede831e testatomic: destroy threads + free all memory at quit to fix --trackmem
(cherry picked from commit 831c79d32f)
2025-02-01 11:02:53 -08:00
Sam Lantinga 482d964733 Don't filter out controllers when launched by Steam under Proton
Fixes https://github.com/libsdl-org/SDL/issues/11579
Fixes https://github.com/libsdl-org/SDL/issues/12106

(cherry picked from commit 3060105cfa)
2025-01-31 15:40:21 -08:00
Sam Lantinga da0cf3f634 Fixed detecting Steam Deck controller on Proton 9.04
Newer versions of Proton properly pass through the Steam virtual gamepad VID/PID, but older Proton (9.x and older) don't, so we have to rely on Steam and Proton hiding controllers we shouldn't have access to.

Fixes https://github.com/libsdl-org/SDL/issues/12106
2025-01-31 15:32:33 -08:00