Commit Graph

21012 Commits

Author SHA1 Message Date
Ryan C. Gordon 69c78a7989 examples/renderer/03-lines: simplified casting on radians calculation. 2025-12-05 12:59:01 -05:00
SDL Wiki Bot a5aa67882d Sync SDL3 wiki -> header
[ci skip]
2025-12-05 17:45:09 +00:00
Eddy Jansson 37715c4029 Document need to include SDL_revision.h
If you want access to the SDL_REVISION define,
you must explicitly include this header.

Language like this was present in the SDL2 version,
but disappeared in SDL3, even though it's still true.
2025-12-05 09:44:07 -08:00
Sam Lantinga 82593fd6c1 Revert "Add the revision to SDL_version.h"
This reverts commit a3992f504c.

The reason SDL_revision.h was not included by SDL.h or SDL_version.h is because SDL_revision.h changes with every git commit, causing a complete SDL rebuild for every trivial git commit.
2025-12-05 09:43:02 -08:00
SDL Wiki Bot 0f37491a8b Sync SDL3 wiki -> header
[ci skip]
2025-12-05 17:42:23 +00: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 a3992f504c Add the revision to SDL_version.h
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-12-05 09:14:03 -08:00
Sam Lantinga 27744952d1 testyuv: respect the --renderer parameter with --all
Also fixed a memory leak at shutdown
2025-12-05 08:46:58 -08:00
Anonymous Maarten 0e96cbd8ce tests: build tests with C99 standard by default 2025-12-05 08:30:52 -08:00
Sam Lantinga 5c7d549267 testyuv: added comprehensive testing of YUV texture rendering
This tests all supported colorspaces and YUV formats across all available renderers
2025-12-05 08:30:52 -08:00
Sam Lantinga e41bdfafe4 testyuv: allow loading BMP files 2025-12-05 08:30:52 -08:00
Sam Lantinga fc8d725367 testyuv: fixed crash if the test file couldn't be loaded 2025-12-05 08:30:52 -08:00
Sam Lantinga 03c932b9a7 testclipboard: load any image format supported by SDL 2025-12-05 08:30:52 -08:00
Sam Lantinga 09304831f6 Fixed issues with YUV texture updates in the 2D renderer 2025-12-05 08:30:52 -08:00
Ryan C. Gordon 8be18741e1 examples/renderer/03-lines: Fix incorrect angle calculation rendering circle.
This fix was contributed by GitHub user hushangazar (thanks!).

Closes #14599.
2025-12-05 10:36:41 -05:00
Vicki Pfau 8e644111c2 gamepad_db: Remove obsolete entry
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
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
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
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
Anonymous Maarten ccdc9231f5 test: allow GNU extensions 2025-12-04 19:22:19 +01:00
Anonymous Maarten 7b74fbb73f test: build testver in with the C90 standard
By building at least one test in C90 mode, we make sure the SDL headers are C90 compatible.
2025-12-04 18:50:19 +01:00
Sam Lantinga b5dd0ee07b Relax the requirement that test programs be C90 compliant
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Fixes https://github.com/libsdl-org/SDL/issues/14588
2025-12-04 07:30:28 -08: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
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Fixes https://github.com/libsdl-org/SDL/issues/14569
2025-12-03 21:21:52 -08:00
Sam Lantinga d83fa92d58 Added notes on main callbacks with other language bindings 2025-12-03 20:50:59 -08:00
cosmonaut aae2f74ae6 GPU: Remove erroneous buffer usage flag from defrag process
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
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
Sam Lantinga f97e53509e Removed SDL_MAIN_AVAILABLE on platforms that don't benefit from it
We already set the main thread when creating a thread or calling SDL_Init(), and applications can call SDL_SetMainReady() themselves for special cases, so there isn't a lot of value of forcing everyone through the SDL_RunApp() flow.

Fixes https://github.com/libsdl-org/SDL/issues/14580
2025-12-03 14:11:25 -08:00
SDL Wiki Bot 36b85ce909 Sync SDL3 wiki -> header
[ci skip]
2025-12-03 20:01:41 +00:00
Jakub Wasilewski 5ae68e9a0f Docs: GPU: Added documentation on the WinPixEventRuntime.dll requirement to affected functions. 2025-12-03 12:00:17 -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
Simon McVittie 65ef4df6d4 testver: Assert that SDL_GetRevision() starts with SDL-
https://github.com/libsdl-org/SDL/issues/14575

Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-12-03 08:48:48 -08:00
Simon McVittie cc681ffeda build-scripts: Include SDL- prefix in SDL_REVISION when built from tarball
https://github.com/libsdl-org/SDL/issues/14575

Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-12-03 08:48:48 -08:00
Anonymous Maarten 3313cb9c4b release: verify SDL_REVISION contains SDL- 2025-12-03 17:13:06 +01:00
Toast 1dea7c801b Added Keychron V5 System Control to the controller blacklist
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
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 bffc4ccc50 Improved keycode documentation
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-12-02 15:31:34 -08:00
Ryan C. Gordon 505cd6cd22 testautomation_video: Don't do fullscreen toggling tests on Emscripten.
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
SDL_SetWindowFullscreen now reports failure while a fullscreen transition is
already in progress on Emscripten, upsetting the test when it tries to come
back to windowed mode, but testautomation will never give correct results here
even when we fix the backend to queue pending reversal requests, because
you'll have to return to the Emscripten mainloop before these state changes
will occur.

It's just sort of luck this specific test passed before on this target.
2025-12-02 14:36:27 -05: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
SDL Wiki Bot 1961b16b78 Sync SDL3 wiki -> header
[ci skip]
2025-12-02 15:26:04 +00:00
Ethan Lee dedab7b72c cocoa: Add SDL_HINT_MAC_PRESS_AND_HOLD hint 2025-12-02 10:24:39 -05:00
SDL Wiki Bot 6217672bde Sync SDL3 wiki -> header
[ci skip]
2025-12-02 12:36:00 +00: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.
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
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."
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Revert "Sync SDL3 wiki -> header"

This reverts commits b7c8b2f29a and
29213efa65.
2025-12-01 14:39:48 -05:00