Commit Graph

20298 Commits

Author SHA1 Message Date
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
Ozkan Sezer
ab57ef9d7b update sdlgenblit.pl after PR/12769
Closes: https://github.com/libsdl-org/SDL/issues/12774.
2025-04-08 18:24:11 +03:00
Ozkan Sezer
b0a0d236d8 fix sdlgenblit.pl so that it actually matches the generated source 2025-04-08 18:24:11 +03:00
Ozkan Sezer
0fdfa925f2 rename local pointer vars 'pixel' to 'pixels'
Reference issue: https://github.com/libsdl-org/SDL/issues/12749.
2025-04-08 18:20:03 +03:00
Sam Lantinga
46c314cc3d Revert "bool is 4 bytes in Apple MacOS X 32 bit PPC ABI"
This reverts commit 5a59b5f321.

The strong ABI guarantee only applies if bool is a byte (we repurposed a Uint8 field as a bool in SDL_gpu.h), and 32-bit PPC isn't a platform we support, so I'm going to back this patch out.
2025-04-08 08:14:25 -07:00
SDL Wiki Bot
2abfb92c5a Sync SDL3 wiki -> header
[ci skip]
2025-04-08 12:11:16 +00:00
Cameron Cawley
97eddacd7a Use the actual value of EGL_PLATFORM_DEVICE_EXT if it's not defined 2025-04-07 13:43:40 -07:00
Ozkan Sezer
4c1a3ccd45 rename local vars 'pixel' to 'pixelvalue'
Reference issue: https://github.com/libsdl-org/SDL/issues/12749.
2025-04-07 21:10:51 +03:00
Ozkan Sezer
433704e774 rename 'pixel' params of SDL_GetRGB, SDL_GetRGBA and SDL_LookupRGBAColor
Reference issue: https://github.com/libsdl-org/SDL/issues/12749.
2025-04-07 21:10:51 +03:00
Cameron Cawley
83b261ae83 Remove unused message box includes 2025-04-07 10:34:07 -07:00
Sam Lantinga
cccad933a0 Updated version documentation to match SDL 3.x practice 2025-04-07 10:22:42 -07:00
Frank Praznik
adad7dcae0 x11/wayland: Ignore redundant restore and fullscreen leave requests when showing the window
The window may be initially maximized or made fullscreen by the window manager for various reasons, such as automatically declaring a window that precisely fills the usable desktop space as maximized, or a "kiosk-mode" automatically making the window fullscreen.

Don't redundantly make restored or unset fullscreen calls when initially showing a window, or the expected state can be unset.
2025-04-07 12:36:58 -04:00
SDL Wiki Bot
d7d6d8e283 Sync SDL3 wiki -> header
[ci skip]
2025-04-07 16:26:59 +00:00
Topi-Matti Ritala
f7b7188837 Add SDL_CreateGPURenderer 2025-04-07 09:26:03 -07:00
Ozkan Sezer
5a59b5f321 bool is 4 bytes in Apple MacOS X 32 bit PPC ABI
Reference issue: https://github.com/libsdl-org/SDL/issues/12749.
2025-04-07 19:21:30 +03:00
Ryan C. Gordon
3b91017682 pulseaudio: cleanup TLS every time we finish a threaded-mainloop callback.
These callbacks run in a thread we don't control, but might call SDL_SetError,
which will claim a TLS slot that never gets otherwise deallocated. To prevent
the leak, finish each callback by explicitly freeing any thread-local data.

Fixes #12732.
2025-04-05 23:02:33 -04:00
Frank Praznik
646f1f243f x11: Only enable _NET_WM_SYNC_REQUEST for OpenGL windows
It doesn't work well with Vulkan, and Vulkan windows may not have the Vulkan flag set in all circumstances, so only enable it if we explicitly know that OpenGL is being requested instead.
2025-04-05 15:41:00 -04:00
Evan Hemsley
33f90f2e41 GPU Vulkan: Clean up in Submit in headless mode (#12744) 2025-04-04 14:27:18 -07:00
SDL Wiki Bot
93b06cffd8 Sync SDL3 wiki -> header
[ci skip]
2025-04-04 20:38:50 +00:00
Maia
c2c3a930b4 Add STRING suffix to SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_* string properties 2025-04-04 13:38:02 -07:00
Caleb Cornett
44710a248c gpu: alpha-to-coverage support 2025-04-04 11:39:08 -07:00
Temdog007
d6d2c958a4 Move global event handlers to SDL_VideoInit
Moved the event handlers from SDL_CreateWindow to SDL_VideoInit
emscripten_set_mouseup_callback
emscripten_set_focus_callback
emscripten_set_blur_callback
emscripten_set_pointerlockchange_callback
emscripten_set_fullscreenchange_callback
emscripten_set_resize_callback
2025-04-04 10:21:12 -07:00
Ryan C. Gordon
05939909da SDL_gpu.h: SDL_GetGPUDeviceProperties() is thread-safe. 2025-04-04 11:44:14 -04:00
SDL Wiki Bot
1687bc746d Sync SDL3 wiki -> header
[ci skip]
2025-04-04 15:40:48 +00:00
Ryan C. Gordon
accd952c4e SDL_gpu.h: Another attempt to clean up SDL_GetGPUDeviceProperties() docs. 2025-04-04 11:39:23 -04:00
SDL Wiki Bot
c5f369f557 Sync SDL3 wiki -> header
[ci skip]
2025-04-04 15:30:28 +00:00
SDL Wiki Bot
0c9eccd0ea Sync SDL3 wiki -> header
[ci skip]
2025-04-04 14:35:40 +00:00
Lucas Murray
906c6c7516 GPU: Add missing error code to VkErrorMessages() 2025-04-04 07:34:52 -07:00