Commit Graph

19705 Commits

Author SHA1 Message Date
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
Sam Lantinga 87fe9ef79b Fixed crash if WGI isn't correlated in RAWINPUT_JoystickRumble() 2025-05-08 15:38:32 -07:00
Sam Lantinga 29d2116495 Define illegal_instruction() when it will be actually used 2025-05-08 11:51:35 -07:00
Sam Lantinga 2aa0957081 Fixed 8BitDo Ultimate 2 Wireless controller on macOS
When connected for the first time over Bluetooth on macOS, the first few reads return 0, so retry a few times in that case.
2025-05-08 10:48:02 -07:00
Ethan Lee ad55597715 ci: Update Steam Linux Runtime tasks.
- Use "3.0" instead of "Sniper"
- Use "steamrt3" instead of "slrsniper"
- Use latest instead of beta for x86_64
2025-05-08 10:24:35 -07:00
Ethan Lee 36c3a7a5e2 ci: Add slrsniper-arm64 task 2025-05-08 10:24:35 -07:00
Sam Lantinga 8690a9ab54 Prefer the HIDAPI driver for 8BitDo controllers on macOS
The HIDAPI driver supports accelerometer, gyro, and rumble.
2025-05-08 10:08:08 -07:00
Sam Lantinga 2b57d58f7d Added GCController mapping for the 8BitDo SN30 Pro on macOS 2025-05-08 09:57:10 -07:00
Sam Lantinga d157600d3d Added GCController mapping for the 8BitDo Pro 2 on macOS
Fixes https://github.com/libsdl-org/SDL/issues/12987
2025-05-08 09:49:10 -07:00
SDL Wiki Bot 09c8d4b556 Sync SDL3 wiki -> header
[ci skip]
2025-05-08 14:49:45 +00:00
nmlgc 37b86a6d2f windows: fix Unicode function and type inconsistencies
The surrounding code in all of these instances expects the Unicode
variants. Previously, this code mixed Unicode and ANSI/ASCII calls if
`UNICODE` was undefined, which caused type and logic errors. Explicitly
spelling out the W removes any reliance on that macro.
2025-05-08 07:22:11 -07:00
Ozkan Sezer d9e58baa6d fixed the field of SDL_MouseMotionTransformCallback 2025-05-08 14:45:24 +03:00
Semphris e7a765d648 Replace SDL_free with delete for new-allocated objects 2025-05-07 15:43:00 -04:00
Sam Lantinga 5bee85408c Cleanup 8BitDo HIDAPI support for SF30 Pro and SN30 Pro
This sets the correct number of buttons for older controllers, and adds parsing for older firmware USB reports
2025-05-07 12:11:27 -07:00
SDL Wiki Bot 89a8cf2505 Sync SDL3 wiki -> header
[ci skip]
2025-05-07 05:54:39 +00:00
expikr 6b048f59d7 fix #12963 2025-05-06 21:17:34 -07:00
8BitDo 2b3c481215
add 8BitDo Controller (#12964)
add SN30 Pro, SF30 Pro, Pro 2.
Supported versions:
Pro 2 v3.06  above
SF30 Pro/SN30 Pro v2.05 above
2025-05-06 19:47:10 -07:00
Sam Lantinga ca47dc59a9 Fixed building with the OpenVR video driver 2025-05-06 16:14:22 -07:00
Sam Lantinga 195ad85ba4 Fixed typo 2025-05-06 16:08:03 -07:00
Frank Praznik f4813ca2cf x11: Filter out duplicate key presses when an IME is active
IME text events can result in sending duplicate key press events, which will result in undesired repeated key presses. Since the events are exact duplicates, compare the serials to filter out redundant key down events.
2025-05-06 18:06:14 -04:00
Sam Clegg 8e1f4bafb4 [emscripten] Remove referenc to Module['createContext']
The Module interface is the one used by the outside world.  This code
is inside the module itself so can use the internal name, avoiding the
need to export this function on the Module at all.

See https://github.com/emscripten-core/emscripten/pull/24269
2025-05-06 14:16:26 -07:00
Ivan Epifanov 1dbb813316 VITA: fix audio playback 2025-05-06 12:55:22 -07:00
SDL Wiki Bot 20f783532b Sync SDL3 wiki -> header
[ci skip]
2025-05-06 17:21:29 +00:00
SDL Wiki Bot bbd973c8d2 Sync SDL3 wiki -> header
[ci skip]
2025-05-06 16:46:42 +00:00
SDL Wiki Bot 71303b41bf Sync SDL3 wiki -> header
[ci skip]
2025-05-06 05:16:13 +00:00
Ryan C. Gordon a7344206e8
wikiheaders: Patched to compile.
(whoops.)
2025-05-05 23:58:59 -04:00
Ryan C. Gordon 06c2f9fcfc
wikiheaders: Correct wiki README digest links. 2025-05-05 23:56:12 -04:00
Ryan C. Gordon ad46394e82
wikiheaders: README.md should be READMEs.md
So it doesn't conflict with the old README directory.
2025-05-05 23:49:06 -04:00
Ryan C. Gordon 2c97a48c51
wikiheaders: READMEs go in the base dir of the wiki now.
Reference PR #12529.

(and several other issues.)
2025-05-05 23:36:08 -04:00
Ryan C. Gordon 92a5417a98
docs: Tweak some minor things to keep wikiheaders happy.
You can't have two sections with the same name (so it can generate unique
page anchors), so fix one of these, and tweak another thing that _isn't_ a
header but wikiheader's quick-and-dirty parser thinks is one.
2025-05-05 23:34:20 -04:00
Sam Lantinga d357aa29a3 Fixed initializing the OpenVR driver 2025-05-05 15:52:28 -07:00
Sam Lantinga f8c77908ad Use motor sequence ID 0 in the HIDAPI GIP driver
Using a 0 sequence number is always allowed and avoids having to synchronize sequence numbers with the controller (and potentially confusing other things talking to the controller)

Also fixes occasional long running rumble at controller connection.
2025-05-05 15:06:54 -07:00
Frank Praznik 33e5f4885a x11: Don't update grab on enter when the mouse is captured
The xserver will still send EnterNotify events while the pointer is captured, and the grab shouldn't be updated in these cases, as it will cause the capture to be lost.
2025-05-05 12:25:50 -04:00
Frank Praznik 1abac3ccc3 Revert "x11: Better handle XInput2 mouse tracking outside the window"
This reverts commit 8c733d1f7b.
2025-05-05 12:25:50 -04:00
SDL Wiki Bot 85d2345bd8 Sync SDL3 wiki -> header
[ci skip]
2025-05-05 15:21:20 +00:00
SDL Wiki Bot 5bd886519b Sync SDL3 wiki -> header
[ci skip]
2025-05-05 15:10:37 +00:00
Frank Praznik c6362b4788
tests: Revert some leftover testing code 2025-05-05 11:08:15 -04:00
Frank Praznik c91f9f6968 x11: #ifdef the XRandR path in the message box code
The runtime check isn't sufficient as the functions are undefined if built without XRandR.
2025-05-05 10:45:54 -04:00
A. Wilcox 7490471796 cpuinfo: Use auxv for AltiVec on Linux if possible
The SIGILL handler is not very reliable and can cause crashes.

Linux provides the CPU's AltiVec support status in getauxval.
2025-05-04 13:52:21 -07:00
Ozkan Sezer 17bba029ba don't prototype strdup() for __clang_analyzer__ case in windows builds.
Fixes:  https://github.com/libsdl-org/SDL/issues/12948.
2025-05-04 10:35:31 -07:00
Katharine Chui 15c6acf74f capture g27 shifter r input
ref: d97f782315/pico_lgff_wheel_adapter/reports.h (L265-L310)
2025-05-03 08:10:41 -07:00
Ryan C. Gordon 795d1ae1fb testmessage: Don't push the event if "Retry" was chosen.
Otherwise, the message box thread goes back to blocking, but the app's main
thread progresses to SDL_WaitThread and won't pump the event queue anymore.

On iOS, this means the messagebox won't pop back up (because it uses
SDL_RunOnMainThread, which needs the event loop to pump), but it's just bad
practice on any platform to stop pumping the event queue for indefinite
lengths of time.
2025-05-02 21:42:47 -04:00
Frank Praznik d73fe0bc53 win32: Hide the borders when showing a fullscreen window
If it is known that the window will immediately enter fullscreen upon being shown, set the borderless style when showing the window to hide the borders, or they may linger in the background if the client takes some time to draw the first frame.

Unnecessarily calling ShowWindow with SW_RESTORE when applying the window flags must be suppressed in this case, or the borders can reappear in a weird, partial state.
2025-05-02 14:21:36 -04:00
Sam Lantinga ab12b7cbba Added support for the share button on the GameSir-K1 FLUX controller 2025-05-02 10:15:16 -07:00