Commit Graph

21080 Commits

Author SHA1 Message Date
Frank Praznik
9092ddff3c wayland: Update the color management protocol
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
No functional changes, just minor updates to track the latest upstream version.
2025-12-15 13:54:31 -05:00
Ryan C. Gordon
db84b948f9 egl: Default to a swap interval of 0.
This matches other platforms.

Also make sure Android explicitly sets vsync on restore, regardless of the
specific setting, to make sure it's consistent.

Fixes #14642.
2025-12-15 12:44:57 -05:00
Ryan C. Gordon
deb85d1fa8 emscripten: find the right SDL_Window during fullscreen events.
Fixes #14629.
2025-12-15 12:08:44 -05:00
Sam Lantinga
64df9cfa47 testmessage: quit if we get a mouse click 2025-12-15 08:56:11 -08:00
Sam Lantinga
bcaedd5781 Fixed messageboxes when using window scenes on Apple platforms 2025-12-15 08:56:11 -08:00
Sam Lantinga
518c98ea01 Pass the window along with evdev touch events
Fixes https://github.com/libsdl-org/SDL/issues/14644
2025-12-15 08:29:36 -08:00
SDL Wiki Bot
de642c8890 Sync SDL3 wiki -> header
[ci skip]
2025-12-14 18:40:08 +00:00
Sam Lantinga
ae8df644d7 Refer to SDL_CreateGPUComputePipeline() appropriately 2025-12-14 10:38:10 -08:00
Sam Lantinga
a3e5335dbf Removed wiki markup 2025-12-14 08:20:00 -08:00
SDL Wiki Bot
16b74a6ffa Sync SDL3 wiki -> header
[ci skip]
2025-12-14 16:03:48 +00:00
Sam Lantinga
517a3d20e8 Support calling SteamAPI_InitEx() before SDL_Init(SDL_INIT_GAMEPAD)
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Calling SteamAPI_InitEx() will set environment variables that SDL uses to properly support the Steam virtual gamepad. Make sure that we fall back to the real environment for the variables that Steam sets.
2025-12-13 23:46:27 -08:00
Sam Lantinga
d780fa144a Don't create the SDL environment in SDL_setenv_unsafe()
We might be setting an environment variable along with other application code setting environment variables (like code in SteamAPI_InitEx()) before initializing SDL.
2025-12-13 21:28:05 -08:00
Frank Praznik
5fe69e73ba x11: Use XInput2 to handle pointer input while grabbed and touches are active
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Core X11 events are used for absolute motion while the mouse is grabbed, as XInput doesn't receive motion events from the master pointer, and the position from the slave devices lags one report behind. However, pointer events emulated from multitouch events can't be filtered out when using core events, as the XInput flags are not passed through.

Use the absolute position from slave devices in XInput motion events while the mouse is grabbed and touch events are active to allow filtering out pointer events emulated from touch events. Pointer events in this case may be a report behind the master device, but receiving input from both the pointer and touches simultaneously is not likely to be a common occurrence.
2025-12-13 11:15:11 -05:00
Sam Lantinga
a2d19ec7f3 Note that uniforms are local to command buffers (thanks @LittleCodingFox!)
Some checks failed
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-12 15:09:56 -08:00
Sam Lantinga
ec19f1e12f Use Uint32 instead of unsigned int for descriptor values 2025-12-12 13:02:39 -08:00
Sam Lantinga
71be323973 Updated Xbox HIDAPI descriptor handling for alternate layout
Fixes https://github.com/libsdl-org/SDL/issues/14597
2025-12-12 13:02:39 -08:00
Fredrik Foss-Indrehus
bdb72bb3f0 cmake: add reftable ref storage support to GetGitRevisionDescription
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
The script assumed Git's traditional loose refs or packed-refs format.
When cloning with extensions.refstorage=reftable, neither .git/refs/*
nor .git/packed-refs exist, causing cmake configuration to fail.

Fall back to git rev-parse when file-based ref lookup fails.
2025-12-11 16:13:49 -08:00
SDL Wiki Bot
76dfb85407 Sync SDL3 wiki -> header
[ci skip]
2025-12-11 23:15:58 +00:00
Frank Praznik
d6f6421973 Revert "Don't enable the text-input protocol when using Fcitx"
It turns out that some distros set SDL_IM_MODULE globally, which leads to broken text input with this check, and there really is no reason not to use the text input protocol when available.

Reverts 2b375d9704
2025-12-11 12:56:49 -05:00
Anonymous Maarten
f8a4fbf128 Remove mkinstalldirs from automake
Some checks failed
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-11 05:48:36 +01:00
Arnoldo Adonaí Barón Robles
e5731f9bac GPU: Fix crash on Android upon returning from the background 2025-12-10 20:58:19 -05:00
Frank Praznik
c2710bd4e8 Don't apply SDL_HINT_MOUSE_DPI_SCALE_CURSORS on Wayland
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Wayland cursors are surfaces sized in scaled points, so this hint wouldn't change the size, just prevent larger backbuffers from being used to draw sharper scaled cursors.
2025-12-10 14:50:00 -05:00
Sam Lantinga
450a2cb5e4 Added support for parsing the Xbox report descriptor
This gives us more robust handling of Bluetooth Xbox controllers which may vary the report format between firmware versions.

Firmware versions tested:
Xbox One S: 3.1.1, 4.8.1923, 5.13.3143
Xbox One S/X: 5.11.3118, 5.23.6
Xbox Elite Series 2: 5.22.16, 5.23.6

Fixes https://github.com/libsdl-org/SDL/issues/14597
2025-12-10 10:49:39 -08:00
Sam Lantinga
ef416e84a1 Use SDL_LogDebug() for dumping HID packets 2025-12-10 10:49:39 -08:00
SDL Wiki Bot
5bbf1dcb44 Sync SDL3 wiki -> header
[ci skip]
2025-12-10 01:13:34 +00:00
Sam Lantinga
466ca58b04 Added SDL_HINT_MOUSE_DPI_SCALE_CURSORS
We only want to change cursor display scale if the application or the user opts in by setting a hint. Otherwise cursors could change size unexpectedly when upgrading to SDL 3.4.0.
2025-12-09 17:12:08 -08:00
Frank Praznik
5b572638b8 video: Handle window destruction in event handlers
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
Windows may be destroyed in event handlers, so check the window validity after pushing window events onto the queue to ensure that the window and its properties are still valid.
2025-12-09 14:10:43 -05:00
Qiu Qiang
62639fdf88 Improve camera frame rate matching on macOS
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
- Prefer formats with narrower frame rate ranges
- Set frame duration on both device and connection
  for better enforcement
2025-12-08 21:03:09 -08:00
Ryan C. Gordon
b3cdeb942a opengl: default to vsync=0 everywhere.
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
This reverts commit 3ee29f2e7a, among other
changes. This means getting a scary warning on the javascript console in
Emscripten by default, but this is easily fixed by setting a GL swap
interval at startup or creating a 2D renderer with the appropriate property
(or call to SDL_SetRenderVSync()).

Fixes #14625.
2025-12-08 15:12:17 -05:00
Anonymous Maarten
a296c40867 isfinite is not available on all platforms, so add a bitmasking alternative
Compiler Explorer shows both result in the same assembly.
2025-12-08 20:48:47 +01:00
Anonymous Maarten
f896e26f59 tests: find X11 and wayland-client 2025-12-08 20:48:47 +01:00
Anonymous Maarten
d19b010d4e cmake: only enable building tests when SDL is the main project 2025-12-08 20:48:47 +01:00
Frank Praznik
14aa5cf762 x11: Remove unused function parameter 2025-12-08 13:15:12 -05:00
Frank Praznik
69255b870d x11: Dedup the X11_FindWindow() function
The was duplicated in the XInput2 code, but taking an SDL_VideoData parameter instead of SDL_VideoDevice. Remove the duplicated XInput2 function, and use an SDL_VideoData parameter for X11_FindWindow to avoid an unnecessary dereference.
2025-12-08 13:15:12 -05:00
Cameron Cawley
a4de176e1c Use the correct pixel formats for Vulkan on big endian 2025-12-08 10:07:31 -08:00
Sam Lantinga
9b36a76ee6 Fixed supported pixel formats on big endian systems (thanks @ccawley2011!) 2025-12-08 08:36:32 -08:00
SDL Wiki Bot
a75bf983e5 Sync SDL3 wiki -> header
[ci skip]
2025-12-08 16:27:12 +00:00
Ryan C. Gordon
6f774908fe audio: SDL_GetAudioDeviceName() now works with the default device IDs.
Fixes #14615.
2025-12-08 11:25:15 -05:00
Sam Lantinga
a35639c7b5 Added patch note for SDL_SetWindowFillDocument() 2025-12-08 08:18:34 -08:00
Sam Lantinga
db3ee5d62b Enable building the tests by default
A common use case is asking someone to clone SDL and run a test. This simplifies the instructions so we don't also have to tell them how to enable the tests. Anyone savvy can just add -DSDL_TESTS=OFF if they don't want to have them.
2025-12-08 08:15:12 -08:00
Ryan C. Gordon
08a547e077 WhatsNew.txt: Removed reference to removed property.
Fixes #14623.
2025-12-08 11:03:42 -05:00
SDL Wiki Bot
b428c1834f Sync SDL3 wiki -> header
[ci skip]
2025-12-08 03:26:26 +00:00
Ryan C. Gordon
5813d0ec0a surface: SDL_RotateSurface should update SDL_PROP_SURFACE_ROTATION_FLOAT.
Fixes #14616.
2025-12-07 22:25:08 -05:00
Ryan C. Gordon
4194879df1 surface: Surface rotation property should be float, not int.
Adjusted camera internals to work in floats, too.

Reference Issue #14616.
2025-12-07 22:25:08 -05:00
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
Some checks failed
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-07 09:30:04 -08:00
Sam Lantinga
9bf86a2db3 Added documentation for the 3.4.0 release 2025-12-07 09:18:29 -08:00
Sam Lantinga
edb81cf84a Fixed whitespace 2025-12-07 09:12:34 -08:00
SDL Wiki Bot
9257df24b5 Sync SDL3 wiki -> header
[ci skip]
2025-12-07 16:05:39 +00:00