Commit Graph

19475 Commits

Author SHA1 Message Date
Lucas Murray d04b28926c GPU: Make D3D12 debug layers optional 2025-04-23 15:57:48 -07:00
Sam Lantinga 695cad459b Corrected documentation for SDL_SetGPUSwapchainParameters() 2025-04-23 14:54:12 -07:00
Maia 2b16c961ea Add and use typedefs SDL_HapticEffectType and SDL_HapticDirectionType 2025-04-23 12:08:21 -07:00
Frank Praznik a1332d77f6 wayland: Cleanup timestamp handling
Better handle some very rare, but possible edge cases if the system has been running for many days.
2025-04-23 12:35:51 -04:00
Ozkan Sezer b5ed0d0138 stb_image.h: apply mainstream PR/1736
Fix root-cause of CVE-2021-45340 : dereference of NULL ptr.
Patch authored by Henner Zeller <h.zeller@acm.org>
Mainstream pull request: https://github.com/nothings/stb/pull/1736
2025-04-23 17:55:02 +03:00
SDL Wiki Bot e3181a0bcd Sync SDL3 wiki -> header
[ci skip]
2025-04-23 03:31:45 +00:00
Ryan C. Gordon e3507b390e examples: added audio/05-planar-data 2025-04-22 23:30:50 -04:00
Ryan C. Gordon 3905aa0587 audio: Added SDL_PutAudioStreamPlanarData.
Fixes #12846.
2025-04-22 23:30:50 -04:00
Ryan C. Gordon 483d1c36ed comments: Fixed a few typos I ran into in the audio code. 2025-04-22 19:40:40 -04:00
SDL Wiki Bot 727a5fae59 Sync SDL3 wiki -> header
[ci skip]
2025-04-22 21:34:48 +00:00
Sam Lantinga 5a8be8e4c2 Fixed formatting 2025-04-22 14:33:47 -07:00
Lucas Murray 6e4ace310c GPU: Validate shader bytecode 2025-04-22 13:07:37 -07:00
Sam Lantinga 89d7d406ab Added tests to cover invalid surface blits
Reproduction case for https://github.com/libsdl-org/SDL/issues/12844
2025-04-22 13:05:38 -07:00
Petar Popovic fe849f1572 SDL_BlitSurfaceScaled(): Do not divide by zero 2025-04-22 13:02:40 -07:00
Petar Popovic 8017d38adc SDL_BlitSurfaceScaled(): Do not blit if surfaces have no pixel data 2025-04-22 13:00:39 -07:00
Sam Lantinga 18fbe6a92f Renamed SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_UINT8 to SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER
Typically we will name the property with the function that is used to set it, and document the range of values.
2025-04-22 10:28:20 -07:00
SDL Wiki Bot 6a6917b0df Sync SDL3 wiki -> header
[ci skip]
2025-04-22 17:25:51 +00:00
Maia e70a49892b Add missing type suffix to SDL_PROP_WINDOW_OPENVR_OVERLAY_ID 2025-04-22 10:25:02 -07:00
Petar Popovic a696b108ac SDL_BlitSurface() comment: Remove sentence about final blit rect being stored in srcrect and dstrect 2025-04-22 10:21:36 -07:00
Sam Lantinga c076b0d17f Removed incorrect documentation for SDL_RenderViewportSet()
Closes https://github.com/libsdl-org/SDL/pull/12854
2025-04-22 10:17:11 -07:00
Cameron Gutman 47162a4168 x11: Send key events for dead keys consumed by the IME
This matches the Wayland backend and what apps originally written for SDL2 are expecting.
2025-04-22 09:18:23 -07:00
Sam Lantinga 3aed80cd82 Updated documentation for SDL_HINT_GPU_DRIVER 2025-04-22 08:58:44 -07:00
Frank Praznik 86b3369491 wayland: Check the origin of clipboard offers before forwarding them to the client
Wayland compositors may send recursive clipboard offers to the client, which need to be filtered out to avoid clearing local data. Previously this was worked around with a hack, but this caused the ownership flag to be set incorrectly, which broke some clients.

This introduces a metadata MIME type of application/x-sdl3-source-id to be sent with SDL3 selection offers, which contains a string that is a unique identifier for the instance, and can be used to detect if a received selection offer is originating from the same instance that generated it.

If DBus is available, the unique identifier string is the unique name of the connection, otherwise, the process ID is used.
2025-04-22 11:29:38 -04:00
SDL Wiki Bot 23a7a74133 Sync SDL3 wiki -> header
[ci skip]
2025-04-22 14:50:56 +00:00
SDL Wiki Bot 3be0ec5631 Sync SDL3 wiki -> header
[ci skip]
2025-04-22 14:46:54 +00:00
Frank Praznik 5bd1578a45 wayland: Account for timer rollover when calculating the elapsed time for key repeats.
The 32-bit millisecond timer can roll over after about 49 days, so this needs to be accounted for.
2025-04-22 10:26:40 -04:00
Frank Praznik 10f51da28d cocoa: Use CGFLOAT_MAX for unbounded max window dimensions 2025-04-21 21:02:01 -04:00
Maia 3519a59d8f The SDL_BUTTON_*MASK defines must come immediately after the SDL_MouseButtonFlags typedef to be associated 2025-04-21 14:24:23 -07:00
SDL Wiki Bot 8e0b39f465 Sync SDL3 wiki -> header
[ci skip]
2025-04-17 18:06:43 +00:00
Frank Praznik 9da46bc37f win32: Check internal data when positioning child windows
Under certain circumstances, processing events may try to position a child before it is fully initialized. Check the internal data before proceeding.
2025-04-16 12:49:50 -04:00
SDL Wiki Bot 90fd2a3cbe Sync SDL3 wiki -> header
[ci skip]
2025-04-13 16:33:01 +00:00
Frank Praznik edd08771a9 wayland: Add xdg_toplevel v7 edge constraint support
If a window isn't resizable from specific directions, the compositor can inform clients of the current edge constraints, so they don't display resize cursors for non-resizable edges.
2025-04-13 11:10:49 -04:00
Frank Praznik 113475acbd wayland: Add multi-seat support
Wayland environments can expose more than one seat for multiple collections of input devices, which can include multiple, simultaneously active, desktop pointers and keyboards with independent layouts. The Wayland input backend previously presumed that only one seat could exist, which caused broken behavior if the compositor exposed more than one, which is possible on wlroots based compositors such as Sway. This introduces support for handling multiple seats, including proper handling of dynamically added and removed seats and capabilities at run time.

The SDL Wayland input system was accreted over time, and the assumption that only one seat will ever exist resulted in state and related objects not always being tied to their most appropriate owner in a multi-seat scenario, so refactoring was required to manage several bits of state per-seat, instead of per-window or globally.

As Wayland keyboards can have per-seat layouts, fast keymap switching is required when multiplexing input from multiple seats to the global SDL keyboard device. A parameter was added to the keymap creation function to specify if the keymap lifetime should be externally managed to facilitate keymap reuse, and some layout info was moved from the global keyboard state to the keymap state to avoid unnecessarily redetermining it whenever a reused keymap is bound. This reduces the overhead of switching keymaps to setting a single pointer.

Multiple seats also means that multiple windows can have keyboard and/or mouse focus at the same time on some compositors, but this is not currently a well-handled case in SDL, and will require more work to support, if necessary.
2025-04-12 13:39:17 -04:00
Sam Lantinga 4093e4a193 Fixed process I/O redirection to NUL on Windows 2025-04-11 15:44:58 -07:00
Sam Lantinga c025fdbb7c Add the CREATE_NO_WINDOW flag for background processes
Fixes https://github.com/libsdl-org/SDL/issues/12097
2025-04-11 15:44:58 -07:00
Sam Lantinga 8a57c83ff9 Updated to GameInput v1.1
The biggest change is that the C API is no longer available.

Here are more details:
https://www.nuget.org/packages/Microsoft.GameInput

Fixes https://github.com/libsdl-org/SDL/issues/12802
2025-04-11 13:42:58 -07:00
Sam Lantinga f35a2736b7 Don't reset the render target when invalidating GPU renderer cache state
Fixes https://github.com/libsdl-org/SDL/issues/12646
2025-04-11 09:23:02 -07:00
SDL Wiki Bot 47e52ab37b Sync SDL3 wiki -> header
[ci skip]
2025-04-10 17:53:43 +00:00
SDL Wiki Bot 6a3dbe34d5 Sync SDL3 wiki -> header
[ci skip]
2025-04-10 17:52:25 +00:00
SDL Wiki Bot d84c000ac5 Sync SDL3 wiki -> header
[ci skip]
2025-04-10 17:25:30 +00:00
Sam Lantinga 98e76d283f Fixed conflict when linking both SDL and hidapi statically
Fixes https://github.com/libsdl-org/SDL/issues/12790
2025-04-10 09:57:37 -07:00
Patrick José Pereira f6db5ba4c9 Add Turtle Beach VelocityOne
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2025-04-10 09:48:31 -07:00
Patrick José Pereira a1016bd06f Allow 01-joystick-polling example to be resizable
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2025-04-10 08:58:40 -07:00
Aubrey Hesselgren 60fb1b5541 Fix IMU orientations for 8bitdo wireless 2 controller in bluetooth mode
Fix IMU timing stamp - simulate the timing stamp from the controller hardware's perspective, as opposed to the receiving computer's perspective. Do this by advancing a time stamp by a fixed rate, based on observation of average rate over bluetooth.
2025-04-09 13:39:25 -07:00
Cameron Cawley b0860fb0c2 Disable EGL in Emscripten builds 2025-04-09 12:37:03 -07:00
Sam Lantinga f303ccca64 Updated the report size for Ultimate 2 Wireless firmware v1.02 2025-04-09 09:17:53 -07:00
Adam Kewley 0add037803 [Windows]: dialog: Add OFN_OVERWRITEPROMPT to save dialogs (#12782) 2025-04-08 21:33:29 -07:00
krizej a390f5716e docs: improve man page generation 2025-04-08 22:52:43 -04:00
Sam Lantinga 93ac1e6894 Fixed non-XBox controllers being detected as Series X controllers
First make sure we have an XBox One controller before checking whether it's a Series X/S controller.
2025-04-08 12:20:27 -07:00
Sam Lantinga d29bb902f3 Don't treat the Keychron K1 Pro System Control keyboard as a joystick
Fixes https://github.com/libsdl-org/SDL/issues/12758
2025-04-08 11:07:20 -07:00