Commit graph

22072 commits

Author SHA1 Message Date
Ryan C. Gordon
49a4c07e23
examples/input/05-gamepad-rumble: add some visual feedback. 2026-06-02 19:50:05 -04:00
Ryan C. Gordon
dc34abc03e
pipewire: Add SDL_HINT_AUDIO_DEVICE_STREAM_NAME callback earlier.
Otherwise, it might cause a deadlock, if the output_callback runs in another
thread while the guaranteed initial hint callback fires. One will wait for the
SDL device lock, the other the pipewire thread loop lock, each already holding
what the other needs.

This way, the hint callback fires and we ignore it, since the stream isn't
set up yet...which is good, because we're about to create the stream and set
that exact same state on it directly anyhow. Now there's no chance of this
deadlock happening.

Reference Issue #15075.
2026-06-02 19:04:28 -04:00
Sam Lantinga
5ede4fbd08 Revert "vfork() isn't functional on DOS"
This reverts commit 91173aba25.

As @icculus mentioned: I'd rather we not get into the business of making fixes by tweaking values in the Preseed files. Were there no preseed file, CMake would correctly record that the vfork function exists, so if we're really hitting the vfork() codepath on DOS, we should stop that in either CMakeLists.txt itself, or in src/process.
2026-06-02 14:16:31 -07:00
Sam Lantinga
91173aba25 vfork() isn't functional on DOS 2026-06-02 12:23:14 -07:00
Simon McVittie
d834351d69 workflows: Stop building for Steam Runtime 3 on arm64
The experimental Steam Linux Runtime 3.0 (arm64) container is being
phased out, so games that want native arm64 binaries should upgrade to
Steam Linux Runtime 4.0.

steamrt/tasks#1032

Signed-off-by: Simon McVittie <smcv@collabora.com>
2026-06-02 12:21:45 -07:00
Ryan C. Gordon
18b29bdd58
PreseedDOSCache.cmake: Add vfork check.
(djgpp actually has this symbol, believe it or not. Not sure what it could
possibly do, but it says it has it!)
2026-06-02 11:25:30 -04:00
Sam Lantinga
cadd67007c Removed k_eControllerType_AndroidController and k_eControllerType_AppleController 2026-06-01 17:55:54 -07:00
Nintorch
96c03dc66e Fix web joystick vibration (again) 2026-05-31 14:13:07 -07:00
Sam Lantinga
dc8b189491 examples: Added input/05-gamepad-rumble 2026-05-31 08:32:44 -07:00
Nintorch
e0eb40f65f Fix web joystick vibration on Safari 2026-05-31 08:04:45 -07:00
SDL Wiki Bot
38e7155cd6 Sync SDL3 wiki -> header
[ci skip]
2026-05-31 02:51:28 +00:00
Ryan C. Gordon
098a066f20
docs: Update documentation for SDL_stack_free.
Reference Issue #15727.
2026-05-30 22:49:38 -04:00
Ryan C. Gordon
67e6f5b7ee
stdinc: make SDL_stack_free evaluate to ((void)(data)) when alloca is usable.
Fixes #15727.
2026-05-30 22:45:33 -04:00
Cameron Gutman
189877b1d3 joystick: Fix conflicting rumble and LED on Sony PS4 gamepads 2026-05-30 17:20:52 -07:00
Ryan C. Gordon
e1aaebff87
SDL_migration.cocci: Add joystick/gamepad event state functions. 2026-05-30 14:05:45 -04:00
Ryan C. Gordon
0cf06bf131
SDL_migration.cocci: add SDL_JoystickGetGUIDString -> SDL_GUIDToString. 2026-05-30 13:49:46 -04:00
Anonymous Maarten
dd0536b170 stdinc: only use _Countof for SDL_arraysize when using a C standard > C23 2026-05-30 13:39:01 +02:00
Vicki Pfau
687a59f277 joystick: Fix underflow with 0 delta timestamp
Some sensors will occasionally report two identical timestamps in a row.
This leads to the timestamp wrapping calculation to underflow, subtracting
0x80000000 from the timestamp whenever it happens. By adjusting the wrap
test, we can just directly add zero to the timestamp, fixing the underflow.
2026-05-29 21:47:50 -07:00
Ryan C. Gordon
9c2f143ca3
wikiheaders: Fix manpages for APIs that return a pointer to a const object.
Previously something like SDL_GetCurrentDisplayMode() would have this output:

```
RETURN VALUE
       *) Returns a pointer to the desktop display mode or NULL on failure; call SDL_GetError() for more information.
```

Now it doesn't have the junk at the start of the text:

```
RETURN VALUE
       Returns a pointer to the desktop display mode or NULL on failure; call SDL_GetError() for more information.

```
2026-05-29 21:10:37 -04:00
replicacoil
c43ab978fd
Added rumble to Gamecube Adapter PC_Mode (#15431) 2026-05-29 17:28:47 -07:00
Sam Lantinga
2b0df96f25 Send SDL_EVENT_WINDOW_EXPOSED when the GPU renderer swap chain is resized
In this case the current frame being rendered doesn't match the swapchain size and the application should re-render the frame.

Fixes https://github.com/libsdl-org/SDL/issues/15550
2026-05-29 14:37:32 -07:00
Sam Lantinga
e04bfb4c6e render: an empty clip rect should clip all drawing
Added a test to validate this and fixed the Metal renderer

Fixes https://github.com/libsdl-org/SDL/issues/15434
2026-05-29 13:58:34 -07:00
NY00123
ed2c8036a7 Android: Remove unused accelerometer-related code and definitions
That also covers removal of the call `SDLActivity.onNativeAccel`,
plus a change of comment under SDL_android.c.

Definitions were previously used while an accelerometer could be listed as a joystick.
2026-05-29 13:14:09 -07:00
Sam Lantinga
8a701808a6 Fixed Steam Controller not detected on macOS under Steam 2026-05-29 12:07:16 -07:00
Sam Lantinga
ec0066aa0b Fixed detecting the Steam virtual gamepad when HIDAPI is disabled 2026-05-29 10:55:57 -07:00
Sam Lantinga
ed6e03436e Added HIDAPI support for the PDP Afterglow Wave Wireless Controller for Switch 2026-05-29 09:56:15 -07:00
Sam Lantinga
634dff3725 Added DEBUG_STEAM_PROTOCOL for the new Steam Controller 2026-05-28 19:51:34 -07:00
Sam Lantinga
113e97e193 metal: fixed reading textures with format SDL_PIXELFORMAT_RGBA128_FLOAT 2026-05-28 11:50:03 -07:00
Sam Lantinga
7103ed4167 Fixed Steam Controller rumble on Android (thanks @Packetdancer!) 2026-05-28 11:39:58 -07:00
Sam Lantinga
f6ffa69890 Add support for new Steam Controller input report on mobile devices 2026-05-28 11:39:58 -07:00
Sam Lantinga
a95f5f9874 testcontroller: make sure touchpad touches are visible even at very light pressure 2026-05-28 09:58:33 -07:00
Sam Lantinga
bb3c61390a Fix mistyped output report message for Steam Controller
This caused hiccups in BlueZ BT driver for Linux
2026-05-27 18:20:17 -07:00
Sam Lantinga
f7a8801227 Add support for new Steam Controller input report 2026-05-27 18:19:43 -07:00
Rachel Blackman
a7ecd5f777 OpenVR: Actually quit correctly if we get a close/quit message. 2026-05-27 17:40:30 -07:00
SDL Wiki Bot
8c0add4351 Sync SDL3 wiki -> header
[ci skip]
2026-05-27 23:36:18 +00:00
Evan Hemsley
7911975414
GPU: Clarify some presentation concerns in docs (#15707) 2026-05-27 16:34:48 -07:00
Sam Lantinga
76560f9e47 Revert "android: fixed a possible joystick-related deadlock on application termination"
This reverts commit 6b4ae68460.

It turns out this deadlock is possible for any joystick event delivery combined with an event watcher that locks joysticks. I'm reverting this change for now, and will be working on a better global solution for this problem.
2026-05-27 13:07:46 -07:00
Ryan C. Gordon
c568c46f51 cmake: Preseed the CMake cache for Haiku OS.
This change drops the configure time on my little Haiku virtual machine from
103 seconds to six.  :)

Fixes #15702.
2026-05-27 15:43:16 -04:00
Ryan C. Gordon
d7ba3efe6b
filesystem: Implement SDL_GetExeName() for all platforms. 2026-05-27 15:41:51 -04:00
Ryan C. Gordon
6b780c5ff9
gdk: Just use WIN_GetModulePath().
There's no need to use the "A" version of GetModuleFileName on GDK; it returns
a UTF-8 string directly on this platform, but we can still use the UTF-16 "W"
version and cut down on code duplication.

This code runs once and caches the results, so we can take the one-time string
conversion overhead.
2026-05-27 15:22:10 -04:00
Anonymous Maarten
bb11c6789c docs: bump minimum required Android ndk version 2026-05-27 20:05:50 +02:00
Frank Praznik
6a3b0413dc x11: Fix boolean/enum comparison
This could set the pending flag even if there was no state change requested, which would cause errant sync timeouts in certain situations.
2026-05-27 12:15:21 -04:00
Ryan C. Gordon
22fb9edd5c
x11: SetupWindowData shouldn't add to videodata->windowlist until success.
Fixes #15676.
2026-05-27 11:43:57 -04:00
zanadoman
d7b1255484 GPU: Return early in SDL_WaitForGPUFences if num_fences is 0 2026-05-27 08:24:34 -07:00
Rachel Blackman
ac177763aa
Ensure we release exclusive USB access to controllers when backgrounded. #15694 2026-05-26 17:40:52 -07:00
Ryan C. Gordon
59a302e601 xr: Add fallback for SDL_PROP_GPU_DEVICE_CREATE_XR_APPLICATION_NAME_STRING.
It'll use SDL_GetAppMetadataProperty(SDL_PROP_APP_METADATA_NAME_STRING) if
necessary now.
2026-05-26 20:27:22 -04:00
Ryan C. Gordon
a49ba90257 metadata: SDL_GetAppMetadataProperty() now uses SDL_GetExeName().
(for SDL_PROP_APP_METADATA_NAME_STRING if unset. If SDL_GetExeName() returns
NULL, it'll fallback to good ol' "SDL Application", as usual.)

Fixes #15692.
2026-05-26 20:27:22 -04:00
Ryan C. Gordon
7d29ce8e31 filesystem: Added SDL_GetExeName().
core/unix had a more-limited copy of filesystem/unix's implementation, called
SDL_GetExeName(). Replace that with a real implementation in filesystem, and
allow each platform to implement it as appropriate.

Implemented for Unix and Windows; most implementations are currently FIXME
stubs at the moment.

Reference Issue #15692.
2026-05-26 20:27:22 -04:00
NY00123
199d509820 Android: Skip duplicated joystick axes during poll
Resolves https://github.com/libsdl-org/SDL/issues/15414
2026-05-26 15:54:33 -07:00
Frank Praznik
cd0b796a6e video: Only ignore modes with a lower color depth in SDL_GetClosestFullscreenDisplayMode()
If a mode with a closer refresh was found, but it had the same color depth as the current best match, it was being dropped. Only ignore the new mode if the color depth is below the current best match.
2026-05-26 18:27:25 -04:00