Commit Graph

20298 Commits

Author SHA1 Message Date
Frank Praznik
6c61a94a4b wayland: Don't add the nanosecond timestamp offset to the pre-conversion millisecond value 2025-05-19 13:59:46 -04:00
Sam Lantinga
25f2376e79 Fixed touch not being delivered as mouse events by default on Vita
Closes https://github.com/libsdl-org/SDL/pull/13070
2025-05-19 08:32:23 -07:00
Joe [ReRezd]
afd1e51023 Fix: GameCube controller adapter hotplug not working
SDL_PrivateJoystickAdded was called before setting the InstanceId in the adapters ctx->joysticks array.  This would eventually broadcast the SDL_EVENT_JOYSTICK_ADDED event with the new InstanceId, if your program listens for the added events and opens joysticks at that point it would always fail because there would be no matching InstanceId in the ctx->joysticks array.
2025-05-19 08:24:40 -07:00
Ethan Lee
510126ee63 gpu: Check shader format support in PrepareDriver 2025-05-19 08:20:33 -07:00
Logan
8289656a4e GPU: Update to set supported shader formats inside CreateDevice 2025-05-18 18:32:50 -07:00
SDL Wiki Bot
514d96de07 Sync SDL3 wiki -> header
[ci skip]
2025-05-17 00:15:49 +00:00
Eduard Gushchin
d6a99752b7 Fix properties name in SDL_CreateGPUDeviceWithProperties 2025-05-16 17:14:58 -07:00
Caleb Heuer
3dceb728b7 Suppress spammy gamepad and joystick update events 2025-05-16 17:08:23 -07:00
Frank Praznik
b0a282e31f wayland: Enable relative pointer mode based on the window flag
This can be toggled per-window, so use the individual window flags instead of the global toggle to selectively enable it only for the relevant window in a multi-seat scenario, as is already done with keyboard and pointer grabs.
2025-05-16 13:12:45 -04:00
danginsburg
968222e74f Fix #13057 - fixes bug with NSEventTypeMouseMoved having a NULL window causing us to suppress future mouse move events because the window was considered out of focus. 2025-05-16 09:52:27 -07:00
ScolderCreations
d16371b923 Fix reference to nonexistent "README-3ds.md" 2025-05-15 11:23:00 -07:00
Stéphane GINIER
945eb6dc87 MacOS: fix cocoa clipboard text
Adjust Cocoa_SetClipboardData so that SetClipboardText text can be pasted outside SDL
2025-05-15 10:54:04 -07:00
Evan Hemsley
b08d79b832 GPU: Check that a texture format is valid for compute writes (#13044) 2025-05-14 16:24:05 -07:00
Evan Hemsley
604c192154 GPU: Always return NULL if beginning a pass fails an assert check 2025-05-14 15:23:23 -07:00
cosmonaut
252129f433 GPU: Debug mode layer and level index checks
Resolves #13033
2025-05-14 12:22:18 -07:00
Sam Lantinga
db154c8b9b Added HIDAPI mapping for the 8BitDo SF30 Pro 2025-05-14 10:18:51 -07:00
Sam Lantinga
ec685e87fd Clarify logic in UpdateLogicalPresentation() 2025-05-14 10:12:41 -07:00
Frank Praznik
8aa5b97bb5 renderer: Always use the output size when updating the main view
The main view always reflects the size of the output, so don't use the dimensions of the currently bound render target texture when updating it, or it will reflect an incorrect size when the render target texture is unbound.
2025-05-14 09:37:30 -07:00
Ryan C. Gordon
1f7aa16eae wikiheaders: Man pages should escape apostrophe chars.
This prevents problems if one starts a line, which would cause it to be
interpreted as a command character.

Fixes #13038.
2025-05-14 11:36:43 -04:00
Vicki Pfau
cf62637261 joystick: Add support for Xbox One Chatpad attachment 2025-05-13 17:30:39 -07:00
SDL Wiki Bot
83cbf7f811 Sync SDL3 wiki -> header
[ci skip]
2025-05-14 00:29:20 +00:00
Manuel
f85f83ec7c SDL GPU: Implemented opt out Vulkan device features (#13016) 2025-05-13 17:28:28 -07:00
Frank Praznik
1eeffc5933 Revert "x11: Send key events for dead keys consumed by the IME"
This and its related commits introduced some bugs and quirks such as duplicated and delayed/missed key events that can't be easily worked around, so revert this for now.

This reverts commit 47162a4168.
2025-05-13 09:21:39 -07:00
Frank Praznik
3304d24bea Revert "x11: Filter out duplicate key presses when an IME is active"
This reverts commit f4813ca2cf.
2025-05-13 09:21:39 -07:00
Sam Lantinga
cd95152b2c Fixed crash if out of memory in the Vulkan GPU driver 2025-05-13 09:07:15 -07:00
Simon McVittie
70b2d162e3 audio: Assert that all devices from device_hash are the appropriate type
The keys and values of device_hash are pairs
`(SDL_AudioDeviceID devid, void *dev)` where dev can be either a
`SDL_AudioDevice *` or a `SDL_LogicalAudioDevice *`, depending on
bit 1 of devid.

We can confirm that we have got this right by looking at the
instance_id member, because logical audio devices happen to start with
the devid, whereas physical devices start with a pointer which is
unlikely to match the devid by chance.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-05-13 08:53:24 -07:00
Frank Praznik
83d4dce697 wayland: Remove all window references from seats when destroying a window
Compositors typically send keyboard, pointer, touch, and tablet leave events when a window is destroyed, however, this is not guaranteed behavior, and at least one compositor in widespread use doesn't always send pointer leave events immediately upon destroying a window. Ensure that all references held by seats to a focused window are removed before the underlying window surface and structs are destroyed to prevent potential segfaults if the seats are immediately destroyed after the window.
2025-05-13 11:32:02 -04:00
Ryan C. Gordon
0a34279578 audio: Fix SDL_GetAudioDeviceName() not working with logical devices.
Fixes #12977.
2025-05-12 13:53:30 -04:00
SDL Wiki Bot
e2f7c4046c Sync SDL3 wiki -> header
[ci skip]
2025-05-12 16:18:27 +00:00
Takase
f6c1e81394 [Process API] Quoting enhancements (#12946) 2025-05-12 09:17:21 -07:00
yunline
9a6f70d75a tray: Fix wrong fByPositon parameter of SetMenuItemInfoW in SDL_SetTrayEntryLabel 2025-05-12 07:01:05 -07:00
Mike Kosek
38da39c8c9 Added rightx and righty 2025-05-12 05:36:21 -07:00
Dominic Bolin
2ae3418260 GPU Vulkan: set correct destination usage mode for storage buffer read/write bindings (#13009) 2025-05-11 16:11:45 -07:00
ManuBlack
c6e9d6cc79 AAudio: Implemented sample frames hint 2025-05-11 16:05:01 -07:00
Frank Praznik
aaa5d70efc wayland: Check the cursor visibility flag when updating seat pointers 2025-05-11 11:05:37 -04:00
Ryan C. Gordon
e1066ceea1 Revert "pulseaudio: cleanup TLS every time we finish a threaded-mainloop callback."
This reverts commit 3b91017682.

This apparently is cleaning up more threads than expected, so this needs a
rethink.

Fixes #12986.
Fixes https://github.com/libsdl-org/sdl2-compat/issues/486
Fixes https://github.com/libsdl-org/sdl2-compat/issues/482
2025-05-11 10:55:42 -04:00
Frank Praznik
84308e7fba x11: Fix the Openbox quirk flag
Openbox needs fullscreen size/position event synthesized, but does not send display changed events.
2025-05-10 15:50:12 -04:00
dbolin
6344712b04 GPU Vulkan: fix for Swapchain Semaphore Reuse 2025-05-10 07:54:50 -07:00
GamesTrap
3f2226a917 Add progress bar support for Linux 2025-05-10 07:53:36 -07:00
RipleyTom
e90f7ac4a8 Add hid_version and hid_version_str to renamed LIBUSB impl symbols 2025-05-10 07:45:06 -07:00
SDL Wiki Bot
f92843da83 Sync SDL3 wiki -> header
[ci skip]
2025-05-10 13:38:22 +00:00
Evan Hemsley
86b206dadf GPU: Special case to avoid assert on GenerateMipmaps (#12995) 2025-05-09 21:45:54 -07:00
Vicki Pfau
7b3bd8c538 joystick: Improve GIP metadata retry
This reduces the number of retries, since they almost never help, and always
attempts the fallback if metadata fails enough times.
2025-05-08 16:41:26 -07:00
Vicki Pfau
367cf9ba63 joystick: Always continue processing GIP packets
This loop breakout was originally from an attempt to parse coalesced packets.
Breaking out early does more harm than good, and no devices coalesce packets,
so this is unnecessary.
2025-05-08 16:41:26 -07:00
Vicki Pfau
955a49c883 joystick: Add quirk for no impulse vibration on the Spectra Pro 2025-05-08 16:41:26 -07:00
Vicki Pfau
82899501b5 joystick: Fix GIP fast ACK issue
By moving the message sending onto the main thread and adding a small timeout
we can now ensure the ACKs are sent fast enough to avoid the firmware bugs in
these controllers.
2025-05-08 16:41:26 -07:00
Vicki Pfau
9e0edea16f joystick: Assume GIP gamepads have the LED command if no metadata is present 2025-05-08 16:41:26 -07:00
Vicki Pfau
9a96960728 joystick: Sort out GIP vendor messages into the supported interfaces 2025-05-08 16:41:26 -07:00
Vicki Pfau
72dd79752e joystick: Add initial support for GIP flight sticks
At the moment, only the ThrustMaster T.Flight Hotas One has full support. The
documentation says you can query the extra buttons via a specific command, but
the stick appears to reject the command. Further investigation is needed for
automatically querying this state.
2025-05-08 16:41:26 -07:00
Vicki Pfau
2248d3812e joystick: Rework GIP code to allow separate states for individual attachments
This is needed for future work bringing up things like the chatpad.

This commit also fixes a few minor things, such as still sending motor packets
to devices that don't support it, enabling quirks that hide trigger rumble on
devices that are marked as not having it, and fixing #12942.
2025-05-08 16:41:26 -07:00