Sam Lantinga
7fc5edab8e
Revert "Don't leak device handle in macOS 10.10 or newer"
...
This reverts commit 5925c27efb
.
Fixes https://github.com/libsdl-org/SDL/issues/12807
(cherry picked from commit 5b951141d2
)
2025-04-29 11:24:27 -07:00
Cameron Gutman
24ccde693e
events: Fix undefined behavior when disabling some event types
...
Shifting a signed int left by 31 is UB.
(cherry picked from commit 15fd3fcdc2
)
2025-04-29 00:32:43 -05:00
Sam Lantinga
f46ef5d76d
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.
(cherry picked from commit 45b01d16b1
)
2025-04-28 20:23:37 -07:00
Petar Popovic
5696677558
SDL_BlitSurface() comment: only dstrect is modified in function
...
(cherry picked from commit 035518d065
)
2025-04-22 10:23:02 -07:00
Boris I. Bendovsky
093307f1f4
[SDL2] Fix using of DXSDK_DIR in older CMake
...
- Remove duplicate 'dollar' symbol in the path
- Use command 'file' to normalize file paths
(cherry picked from commit 40b1eac541
)
2025-04-22 10:12:55 -07:00
Ozkan Sezer
f54014e173
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
(cherry picked from commit bfab0a968f
)
2025-04-03 19:55:04 +03:00
Sam Lantinga
64ad33884d
Updated to version 2.32.5 for development
2025-03-31 12:58:50 -07:00
Sam Lantinga
2359383fc1
Updated to version 2.32.4 for release
release-2.32.4
2025-03-31 09:12:51 -07:00
Sam Lantinga
b2a95b2482
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 3e47181800
)
2025-03-25 09:09:59 -07:00
Carl Åstholm
2708e08f40
emscripten: Don't use legacy JS library functions for assertions
...
(cherry picked from commit 54f5b73333
)
(cherry picked from commit a8f0eb4c33
)
2025-03-20 16:36:25 -07:00
Dragon-Baroque
3f6efbf2df
The posix4 library has been merged into the libc library
...
Backported from commit 07e4dea693
.
Reference issue: https://github.com/libsdl-org/SDL/issues/12588 .
(cherry picked from commit d63b3376a4
)
2025-03-20 09:48:20 +03:00
Sam Lantinga
9b048e73a2
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
)
(cherry picked from commit 52146cf067
)
2025-03-17 13:57:58 -07:00
Sam Lantinga
d3bb91522f
Fixed crash if info->path is NULL
...
(cherry picked from commit 715301cef5
)
(cherry picked from commit 46a51b4298
)
2025-03-17 09:48:13 -07:00
SDL Wiki Bot
c8c4c97727
Sync SDL2 wiki -> header
...
[ci skip]
(cherry picked from commit fc536dcb7e
)
2025-03-12 22:55:50 +03:00
Sam Lantinga
f08a5cfcab
Fixed sscanf("026", "%1x%1x%1x", &r, &g, &b)
...
Fixes https://github.com/libsdl-org/SDL/issues/12510
(cherry picked from commit be6ed6e9c4
)
(cherry picked from commit 1caae3e9e4
)
2025-03-10 15:45:43 -07:00
SDL Wiki Bot
e9d2f60e1c
Sync SDL2 wiki -> header
...
[ci skip]
(cherry picked from commit 22a87a22ca
)
2025-03-07 22:45:02 +03:00
Neal Gompa
9e079fe9c7
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
)
(cherry picked from commit 6be87ceb33
)
2025-03-06 14:37:46 -05:00
Sam Lantinga
53c022c880
Updated to version 2.32.3 for development
2025-03-01 18:13:50 -08:00
Sam Lantinga
e11183ea6c
Updated to version 2.32.2 for release
release-2.32.2
2025-03-01 18:03:11 -08:00
Sam Lantinga
024c27645a
Added support for the "%n" sscanf format specifier
...
(cherry picked from commit 6980325310
)
(cherry picked from commit ab44451578
)
2025-02-25 08:08:55 -08:00
SDL Wiki Bot
c2047f0496
Sync SDL2 wiki -> header
...
[ci skip]
(cherry picked from commit 52ac07d327
)
2025-02-25 08:08:55 -08:00
Tomasz Pakuła
220895d4d2
[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
(cherry picked from commit 0809be4ec5
)
2025-02-25 08:08:55 -08:00
Petter Reinholdtsen
282f7a84fc
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
(cherry picked from commit 24693ac285
)
2025-02-25 08:08:55 -08:00
Cameron Gutman
9be8c2a899
keyboard: Fix comment regarding implicit calls to SDL_StartTextInput()
...
It was always done inside SDL_VideoInit().
(cherry picked from commit 92cadaf917
)
2025-02-25 08:08:55 -08:00
Anonymous Maarten
51e20f1666
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
(cherry picked from commit d2eb72fd14
)
2025-02-23 21:40:48 +01:00
Anonymous Maarten
a34c8403e7
ci: GitHub is retiring Ubuntu 20.04 support
...
backport of 8d3db06ff2
(cherry picked from commit b4d733619a
)
2025-02-23 21:40:48 +01:00
Anonymous Maarten
dc74448014
ci: clang32 on msys2 is EOL
...
backport of 70f657e520
(cherry picked from commit ed2c004c8a
)
2025-02-23 21:40:40 +01:00
Paper
155f99a4e6
thread/windows: fix stack overflow in exception naming
...
(cherry picked from commit 1a853973ab
)
(cherry picked from commit 6421f12d7f
)
2025-02-20 08:20:58 -08:00
Ozkan Sezer
63bb1a8583
dynapi: use DosScanEnv() for os/2.
...
(cherry picked from commit ee49025f80
)
2025-02-20 11:50:04 +03:00
Sam Lantinga
8b0c9e1dce
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
(cherry picked from commit 5925c27efb
)
2025-02-19 17:00:05 -08:00
Sam Clegg
7f74c1ed63
Fix SDL_emscriptenaudio.c under wasm64
...
Verified locally by running `browser64.test_sdl2_mixer_wav` in
emscripten.
(cherry picked from commit aa00738a21
)
2025-02-19 17:00:05 -08:00
Sam Lantinga
7a44b1ab00
Updated to version 2.32.0 for release
release-2.32.0
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
Sam Lantinga
55a75875f0
Improved XInput controller detection
...
Sometimes we'll get a Windows.Gaming.Input callback before the raw input device is even in the list, so try some other methods to better detect XInput devices.
2025-01-31 08:45:20 -08:00
Deve
934d6954e2
Fixed crash when trying to disconnect secondary display on iOS
2025-01-29 14:45:49 -08:00
Sam Lantinga
0efe8892d6
Skip IsRegularFileOrPipe() check on Emscripten
...
The sandbox guarantees that this will be true.
Fixes https://github.com/libsdl-org/SDL/issues/12108
(backported from from commit 1c7cc60286
)
2025-01-28 10:47:10 +03:00
Ryan C. Gordon
d3a4d62fc2
.wikiheaders-options: Removed wikipreamble setting.
...
Reference https://github.com/libsdl-org/sdlwiki/issues/713 .
2025-01-24 01:51:11 -05:00
Anonymous Maarten
3f02118264
ci: bump to NetBSD 10.1
...
(cherry picked from commit 98c447802f
)
(cherry picked from commit 18ecd2ccad
)
2025-01-23 00:32:56 +03:00
Tomasz Pakuła
5bf8955b25
Use proper polar direction when creating FF_RUMBLE effect
...
Uses proper polar direction of 90 degrees. Previous value probably came from mistakenly using spherical system default.
2025-01-20 16:52:11 -08:00
Tomasz Pakuła
529ed102fc
Translate conditional effect direction instead of hardcoding it to 0
...
Provious code wrongly assumed that direction is not an important part
of conditional effect. Moreover, if there's need to hardcode polar
direction, the default should be 0x4000 (north).
For one axis affects, a direction of 0 means complete lack of force, if
a FFB-enabled device takes direction into force calculation. A sine function
graph can be used to represent the resulting forces where X is the input
direction and Y is the force multiplier (360 degrees equals to 1).
This fixes conditional effect playback on Moza Racing devices, which do
not ignore direction field.
2025-01-20 16:52:11 -08:00
Sam Lantinga
4b19f7e012
Added support for the 8BitDo Ultimate 2C Wireless in Bluetooth mode
...
Closes https://github.com/libsdl-org/SDL/pull/11415
(cherry picked from commit c7d1fd90ea
)
2025-01-18 07:07:12 -08:00