Commit Graph
12744 Commits
Author SHA1 Message Date
Ryan C. Gordon 9918d6cb5e emscripten: Move fill-document from hint/property to a window flag.
Fixes #14617.
2025-12-07 21:12:13 -05:00
Qiu Qiang 19988c5faa Fix loop variable bug in V4L2 camera format enumeration 2025-12-07 14:11:27 -08:00
Sam Lantinga 7773157fae Updated to version 3.3.5 for development 2025-12-07 09:30:04 -08:00
Sam Lantinga 97b0b13147 Fixed subdirectories showing in enumeration of Steam storage 2025-12-06 22:35:05 -08:00
Christian Semmler 7e78636e8e Handle SharedArrayBuffer for PNG data
The Emscripten support for setting window icons introduced in #14490 does not work when using pthreads. Using `SetWindowIcon` will cause the program to crash. The reason for that is that the `Blob` constructor does not accept shared memory (`SharedArrayBuffer`).

We need to create a local copy of the icon data if necessary.
2025-12-06 22:11:55 -08:00
Sam Lantinga f173fd28f0 Updated to version 3.3.4 for preview release 2025-12-06 14:57:22 -08:00
Sam Lantinga eba0630907 Fixed the directory in the enumeration callback for Steam storage
This is guaranteed to have a path separator at the end
2025-12-06 14:48:02 -08:00
Sam Lantinga 1978506112 Reverse file iteration in the Steam storage
This prevents us from skipping files if they are deleted from within the callback.
2025-12-06 14:09:58 -08:00
Sam Lantinga eea8090f84 Steam storage improvements
* Implemented EnumerateStorageDirectory()
* Implemented RemoveStoragePath()
* Fixed init failure if the application previously crashed with a write batch in progress
* Allow creation of multiple Steam storage objects, the write batch is complete when the last storage is closed
* Check to see if a file exists in GetStoragePathInfo()
2025-12-06 13:27:51 -08:00
Ethan Lee 96b5c92780 render: D3D12 Xbox does not have COMPARISON_FUNC_NONE yet 2025-12-06 16:10:35 -05:00
Ethan Lee b74ba6298c Xbox buildfix for IsWindowsBuildVersionAtLeast 2025-12-06 15:34:17 -05:00
Ryan C. Gordon 2c11d62d17 camera: Report rotation needed to account for device orientation.
Fixes #11476.
2025-12-06 13:51:10 -05:00
Sam Lantinga 6602f12744 SteamAPI_ISteamRemoteStorage_FileWrite() returns bool 2025-12-06 09:44:04 -08:00
LuncyBloont ab67be7e5a Fix crash in UploadToTexture() on DX12. 2025-12-05 11:46:41 -08:00
Frank Praznik 3d2b79c096 x11: Drop emulated pointer button events
Drop emulated pointer button events, as scroll valuators are handled natively, and SDL emulates mouse events from touch events on its own.
2025-12-05 14:44:16 -05:00
Sam Lantinga e047aeeb7c Added a Linux mapping for the ZhiXu GuliKit Controller D 2025-12-05 11:22:38 -08:00
Sam Lantinga f38d31a811 Removed mappings for Xbox controllers supported by the Linux kernel
The mappings may vary between kernel versions, so we'll use the automatic mapping code to get the right one for the running system.
2025-12-05 11:22:38 -08:00
Sam Lantinga 71147216dc Removed entries for controllers that aren't Xbox controllers 2025-12-05 11:22:38 -08:00
Jakub Wasilewski f5ea8805e1 Change how WinPixEventRuntime.dll is used under D3D12/Windows. (#14600)
* GPU: D3D12: Missing WinPixEventRuntime.dll now logs warning at device creation time.
* GPU: D3D12: Debug label functions are now a no-op when WinPixEventRuntime.dll is missing.
* Docs: GPU: Debug function documentation now notes WinPixEventRuntime.dll is required under D3D12.
2025-12-05 09:40:57 -08:00
Sam Lantinga 09304831f6 Fixed issues with YUV texture updates in the 2D renderer 2025-12-05 08:30:52 -08:00
Vicki Pfau 8e644111c2 gamepad_db: Remove obsolete entry
This autodetects properly with modern SDL as-is
2025-12-04 21:35:59 -08:00
Ozkan Sezer c7133a6720 stb_image.h: update mainstream issue/1838 patch from mainstream PR/1839
patch authored by @NBickford-NV.
2025-12-05 03:30:10 +03:00
Sam Lantinga 12e3162c5f Use the Vision Pro headset native refresh rate
The headset actually has dynamically adjusting refresh rate, but 90Hz is closer to it's normal operating mode.
2025-12-04 14:08:49 -08:00
Eddy Jansson 2cb9a4fcc1 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.
2025-12-04 13:19:53 -08:00
Ryan C. Gordon bc17a8922b emscripten: Allow SDL_HINT_EMSCRIPTEN_FILL_DOCUMENT to be toggled on a window.
Fixes #14567.
2025-12-04 15:39:47 -05:00
hwsmm 3b12019892 Fix an inverted condition in Wayland pen tip handling 2025-12-04 07:21:28 -08:00
Sam Lantinga c61497b744 Account for indexed formats when matching texture formats
Fixes https://github.com/libsdl-org/SDL/issues/14569
2025-12-03 21:21:52 -08:00
cosmonaut aae2f74ae6 GPU: Remove erroneous buffer usage flag from defrag process 2025-12-03 15:03:25 -08:00
milkmull 70c2f576c8 fixed issue where video events could be posted while system was quitting (#14572) 2025-12-03 14:17:11 -08:00
Jakub Wasilewski 0c5ad99ec1 GPU: D3D12: Use WinPixEventRuntime.dll for debug events when available.
This prevents validation errors on D3D12 caused by the previous solution
that utilized internal D3D12 functions. This is still the fallback
solution if WinPixEventRuntime.dll is not present in PATH, but a warning
is printed to let you know how to fix these errors.
2025-12-03 12:00:17 -08:00
Toast 1dea7c801b Added Keychron V5 System Control to the controller blacklist 2025-12-03 07:08:42 -08:00
Toast adb0013470 Added the Keychron Link reciever to the controller blacklist 2025-12-03 07:08:42 -08:00
Sam Lantinga 866ec367ad Fixed error messages for Steam storage 2025-12-02 09:43:58 -08:00
Sam Lantinga f92435cdb9 Vulkan windows get the Vulkan GPU backend in the gpu renderer by default 2025-12-02 07:29:33 -08:00
Ethan Lee dedab7b72c cocoa: Add SDL_HINT_MAC_PRESS_AND_HOLD hint 2025-12-02 10:24:39 -05:00
Sam Lantinga e1edeab0c9 Added touch subsystem locking
Fixes https://github.com/libsdl-org/SDL/issues/14563
2025-12-02 01:11:38 -08:00
Sam Lantinga 22decf4783 Fixed some clang thread-safety warnings 2025-12-02 01:11:38 -08:00
Ryan C. Gordon 737be31c63 emscripten: Prevent fullscreen transitions while one is already in progress.
Fixes #14533.
2025-12-01 23:33:30 -05:00
Cameron Gutman 6d99204a82 quit: don't call signal() if we're using sigaction()
At best, this is a no-op.

At worst, it might:
 - Clobber a signal handler someone registered after us
 - Overwrite the signal mask or flags
 - Cause unregistration to fail (sigaction() isn't guaranteed to return the exact pointer passed to signal())
2025-12-01 17:31:55 -06:00
Evan Hemsley 2b1904a849 GPU: Prefer D3D12 over Vulkan when available 2025-12-01 17:50:23 -05:00
Ryan C. Gordon c1db2b4bb0 Revert "hints: Added SDL_HINT_AUDIO_ENFORCE_MINIMUM_SPEC."
Revert "Sync SDL3 wiki -> header"

This reverts commits b7c8b2f29a and
29213efa65.
2025-12-01 14:39:48 -05:00
unknown b7c8b2f29a hints: Added SDL_HINT_AUDIO_ENFORCE_MINIMUM_SPEC.
Fixes #14426.
2025-11-30 23:26:02 -05:00
Sam Lantinga 1c46c8a3dc Set SDL_MAIN_AVAILABLE for all platforms 2025-11-30 12:15:48 -08:00
Sam Lantinga 778f70c906 Clarify which thread is the main thread
If video is initialized, the main thread is the one that initialized video, otherwise if events are initialized, the main thread is the thread that initialized events, otherwise the main thread is the one that called the main function.

Fixes https://github.com/libsdl-org/SDL/issues/14511
2025-11-30 12:15:48 -08:00
Ozkan Sezer 9c6c2387b9 stb_image.h: apply patches from mainstream PRs 1839, 1862 and 1863.
Patches authored by @NBickford-NV to fix mainstream issues 1838, 1860,
1861.
2025-11-30 23:11:20 +03:00
Sam Lantinga 5e9163592f Correct the sensor axis ordering with the Linux Nintendo driver
Fixes https://github.com/libsdl-org/SDL/issues/14552
2025-11-30 11:35:36 -08:00
Sam Lantinga b9d794bb37 Fixed pen mouse motion when SDL_HINT_PEN_MOUSE_EVENTS is off (thanks @frenzibyte!)
Fixes https://github.com/libsdl-org/SDL/issues/14554
2025-11-30 10:55:47 -08:00
Salman Alshamrani 7af479bc53 Fix iOS text input not working with password integration 2 2025-11-30 10:30:06 -08:00
Amelia Clarke defd7895da events: fix SDL_PeepEvents() returning 0 on error
Signed-off-by: Amelia Clarke <selene@perilune.dev>
2025-11-28 07:41:30 -08:00
Sam Lantinga fdcd548612 Added SDL_PROP_WINDOW_CREATE_WINDOWSCENE_POINTER
This lets applications choose which scene their windows are being created in. For example one window might be video output in a scene with a session role of UIWindowSceneSessionRoleExternalDisplayNonInteractive, and video controls in a scene with a session role of UIWindowSceneSessionRoleApplication.
2025-11-26 12:37:58 -08:00