Commit Graph

19673 Commits

Author SHA1 Message Date
Sam Lantinga
f62c982bcf Reverted Accelerometer and Gyro displays to throttled display (10hz)
Also made accelerometer threshold for drift calibration more lenient for very noisy accelerometers.

The testcontroller tool could eventually be used to come up with a better way to profile an IMU's "stationary" noise so that this threshold can be as tight as necessary for the sake of automatic drift calibration.

(thanks @HilariousCow!)
2025-06-16 11:14:22 -07:00
Sam Lantinga
b833c618a9 Improved reliability detecting FlyDigi Vader controllers 2025-06-16 11:07:50 -07:00
SDL Wiki Bot
0e262dfd44 Sync SDL3 wiki -> header
[ci skip]
2025-06-16 02:13:37 +00:00
Ryan C. Gordon
6c406dd122 include: a couple of documentation tweaks and typo fixes. 2025-06-15 22:12:21 -04:00
SDL Wiki Bot
42c9fe119d Sync SDL3 wiki -> header
[ci skip]
2025-06-16 00:36:13 +00:00
Aubrey Hesselgren
f5d1402c28 Flydigi Vader 4 Pro IMU rate correction (#13215)
Flydigi IMU rate now matches observed rate of packets in both dongle and wired connection.

Flydigi Vader 4 Pro IMU rate correction was set at a fixed 125hz. In actuality rate is 1000hz over dongle and 500hz when wired.
2025-06-13 22:29:19 -07:00
Aubrey Hesselgren
1e886c8a2f 8 bitdo polling rate corrections (#13221)
Gathered correct IMU polling rate in wired mode for good gyro synchronization.

Wireless: different models had different amounts of Bluetooth packet loss.
USB_PRODUCT_8BITDO_ULTIMATE2_WIRELESS: Solid 120hz over bluetooth (note: only appears via).
USB_PRODUCT_8BITDO_PRO_2_BT: Lossy - 80-90hz registered.
SB_PRODUCT_8BITDO_SN30_PRO_BT & USB_PRODUCT_8BITDO_SN30_PRO_BT: Very Lossy - 60-90hz registered
2025-06-13 22:25:31 -07:00
Aubrey Hesselgren
913b611ccd Added tools for evaluating gyroscope accuracy and IMU polling rates. (#13209)
* Added tools to Test Controller for evaluating gyroscope accuracy and IMU polling rates.

This adds a visual suite to the testcontroller tool to help validate IMU data from new gamepad drivers and HID implementations.

The 3D gizmo renders accumulated rotation using quaternion integration of gyroscope packets. If a controller is rotated 90° in real space, the gizmo should reflect a 90° change, allowing quick detection of incorrect sensitivity or misaligned axes.

Also includes:
- Euler angle readout (pitch, yaw, roll)
- Real-time drift calibration display with noise gating and progress
- Accelerometer vector overlay
- Live polling rate estimation to verify update frequency

Intended for developers working on controller firmware or SDL backend support to confirm correctness of IMU data processing.
2025-06-13 14:01:52 -07:00
Frank Praznik
e2239c36d3 wayland: Ensure that the tablet tool list is always initialized to empty
Otherwise, it will be left in an uninitialized, non-empty state if the tablet protocol isn't present.
2025-06-13 15:57:31 -04:00
Xaver Hugl
ec1297199e wayland: Implement the pointer warp protocol
The pointer warp protocol allows us to warp the pointer to a different position on
the surface, without any hacks like locking and unlocking the pointer.
2025-06-13 15:40:49 -04:00
ceski
558a89fdb6 Read Switch controller gyro/accel sensitivity coeffs (SDL3)
These vary by controller, so using the stored values should improve the accuracy of the sensor data.
2025-06-13 12:18:05 -07:00
SDL Wiki Bot
fd4ffa6d27 Sync SDL3 wiki -> header
[ci skip]
2025-06-13 17:06:54 +00:00
e4m2
c5b1341757 Tweak Vulkan include guard check and 64-bit platform defines (#13210) 2025-06-12 09:32:07 -07:00
Sam Lantinga
e18a6313de Added gyro support for the Flydigi Vader 3 Pro controller 2025-06-12 09:10:07 -07:00
Klay
71f479b4aa Fix a broken link inside README-cmake.md that's meant to send to README-linux.md
also made said link more consistent with other links by adding .md suffix
2025-06-10 18:46:35 -04:00
Cameron Cawley
f2bcfe3dd2 Correct the texture format used for the N-Gage (#13192) 2025-06-08 18:56:24 +02:00
Michael Fitzmayer
685f1720fe Revert "[Nokia N-Gage] Fix alpha transparency in 4K color mode using BitBltMasked"
This reverts commit 2ef7944170 due to unbearable performance issues.
2025-06-07 22:45:54 +02:00
Splendide Imaginarius
a89a20a9ab Fix Markdown typo in Arch Linux dependencies docs
A blank line is needed for the code block to be recognized.
2025-06-07 13:34:56 -04:00
Michael Fitzmayer
cbc9d662ea [Nokia N-Gage] Add define to disable FPS counter by default. 2025-06-07 15:40:53 +02:00
Edu García
d9af41b5ac cmake: more private definitions 2025-06-06 10:29:20 -07:00
Sam Lantinga
5826966873 Fixed replacing existing specific gamepad mappings
If the first mapping we see doesn't have a CRC, continue looking for another exact CRC match.

Fixes testautomation --filter TestVirtualJoystick
2025-06-06 09:53:15 -07:00
Sam Lantinga
f90a21483c Added support for the ZEROPLUS P4 Wired Gamepad 2025-06-06 09:25:36 -07:00
Sam Lantinga
638acdc02a Remove the CRC from automatically generated gamepad mappings
Fixes https://github.com/libsdl-org/SDL/issues/13127
2025-06-06 09:22:14 -07:00
Frank Praznik
45eb6310a8 x11: Resize fixed-size windows after mapping on xmonad
XMonad ignores size hints and shrinks the client area to overlay borders on fixed-size windows, even if no borders were requested, resulting in the window client area being smaller than requested. Calling XResizeWindow after mapping seems to fix it, even though resizing fixed-size windows in this manner doesn't work on any other window manager.
2025-06-06 11:35:31 -04:00
Vicki Pfau
7dd5e765df joystick: Report battery on GIP controllers 2025-06-05 18:34:22 -07:00
Vicki Pfau
c54a017f47 joystick: Clean up Elite Button handling 2025-06-05 18:34:22 -07:00
Vicki Pfau
559efd58e2 joystick: Add headset stub to GIP driver 2025-06-05 18:34:22 -07:00
Frank Praznik
7cc3feeb1b keyboard: Search for the correct base key value when querying the keycode from a scancode
When querying the keycode produced by a scancode with a certain set of modifiers, it would fall back to defaults if a key hash value with the exact set of modifiers wasn't found, which resulted in certain modifier combination returning incorrect keycodes on non-ANSI keyboard layouts. For example, querying SDL_SCANCODE_Y with the alt modifier on a QWERTZ layout returns SDLK_Y instead of SDLK_Z on most platforms, as the backends don't generate a specific entry for this key + modifier combo, so the lookup would fall back to the default ANSI layout.

Adding additional key+modifier combinations when building the keymap is one solution, but it makes an already expensive operation even more so, pushing the time needed to build the keymap into double-digit milliseconds in some cases due to the large amount of key combos that need to be queried, most of which are redundant.

Instead, falling back to searching through the shift levels for the given modifier state when querying the keymap will ensure that the most appropriate keycode is returned. This does add some overhead to lookups if the key doesn't have an entry with the exact set of modifiers, but it is minimal as hash table lookups are an inexpensive operation, and unnecessary lookups are avoided. In my own testing of an optimized build, the difference between best-case and worst-case performance (the latter of which is highly unlikely in real-world usage) is only a few hundred nanoseconds. Additionally, the unmodified keys are queried when pumping events, so there is no additional overhead in that case.
2025-06-05 14:42:29 -04:00
Frank Praznik
22fa45b3c1 win32: Ensure that text input is initially disabled when creating a window
Windows seems to implicitly enable IME text input on windows created while an IME is active, which causes the IME suggestion window to pop up when keys are pressed, even if a client never explicitly enabled it. Ensure that IME support is initially disabled on new windows; SDL will enable it at a later time, if required.
2025-06-05 12:20:35 -04:00
SDL Wiki Bot
c240ed976f Sync SDL3 wiki -> header
[ci skip]
2025-06-05 16:02:05 +00:00
Sam Lantinga
27464ffb08 Clarify that icon and cursor alternate images are added with SDL_AddSurfaceAlternateImage() 2025-06-05 09:00:49 -07:00
Michael Fitzmayer
2ef7944170 [Nokia N-Gage] Fix alpha transparency in 4K color mode using BitBltMasked
Previously, all transparent pixels were rendered as opaque due to the limitations of the 4K color mode. Replaced Gc()->BitBlt() with Gc()->BitBltMasked() and updated the mask during copy operations to correctly respect the alpha channel of textures, while maintaining good performance.
2025-06-04 21:05:29 +02:00
Ethan Lee
d86fb8a83a gdk: Ignore focus loss events caused by text input showing the OSK 2025-06-04 09:40:33 -04:00
Sam Lantinga
6622f4e1ea Added support for the NACON Revolution X Unlimited controller on macOS
This adds support for the controller in Bluetooth mode.

Fixes https://github.com/libsdl-org/SDL/issues/13143
2025-06-03 15:05:11 -07:00
Michael Fitzmayer
45aa497813 [Nokia N-Gage] Fix SDL_GetPerformanceFrequency and SDL_GetPerformanceCounter 2025-06-03 21:59:33 +02:00
Sam Lantinga
7457857304 Fixed input from the MayFlash GameCube adapter with version 7 firmware 2025-06-03 11:13:43 -07:00
SDL Wiki Bot
1ec12b38e5 Sync SDL3 wiki -> header
[ci skip]
2025-06-03 15:31:53 +00:00
Simon McVittie
b6c4a46b85 workflows: Use stable Steam Runtime 3 on both x86_64 and arm64
The first public beta that had a corresponding arm64 version has now
been promoted to stable, and subsequent releases will be for both
x86_64 and arm64.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-06-03 10:44:25 -04:00
Evan Hemsley
fbba5b272a GPU: Binding validation and prevent null dereference if expected binding is missing (#13164) 2025-06-02 13:39:58 -07:00
Sam Lantinga
cf6c42e6e6 Use HEAPU8.set rather than Module.HEAPU8.set (thanks @sbc100!)
The Module object is the external interface to the application, internal symbols like HEAPU8 don't need to be exported to be used and usage should not be prefixed with Module.

Fixes https://github.com/libsdl-org/SDL/issues/13156
Closes https://github.com/libsdl-org/SDL/pull/13157
2025-06-02 09:47:26 -07:00
Sam Lantinga
4b0f48c4cf Mark gamepads as invalid if they can't be opened
Fixes https://github.com/libsdl-org/SDL/issues/13129
2025-06-02 09:21:13 -07:00
SDL Wiki Bot
a314a58e7e Sync SDL3 wiki -> header
[ci skip]
2025-06-01 22:00:52 +00:00
SDL Wiki Bot
d283f4651c Sync SDL3 wiki -> header
[ci skip]
2025-06-01 21:52:34 +00:00
Ryan C. Gordon
8510331f66 .wikiheaders-options: Add Tray to quickreference categories. 2025-06-01 10:48:32 -04:00
Ryan C. Gordon
b8187e2abd wikiheaders: Trim whitespace from end of lines in section headers. 2025-06-01 10:43:08 -04:00
Ryan C. Gordon
9e0d9f30a7 x11: Be a little less aggressive with Xinput2IsInitialized checks.
Just in case this ever get deinitialized sooner, we'd still like to SDL_free()
things on shutdown, etc.

Reference PR #13148.
2025-06-01 10:14:01 -04:00
Mason Remaley
57b6e6c7f9 Checks if xinput is loaded before trying to call xinput functions 2025-06-01 10:11:23 -04:00
Ryan C. Gordon
ac3ab026fe audio: corrected comment about device format minimums. 2025-06-01 03:01:37 -04:00
Ryan C. Gordon
83cc3bc234 audio: Opened device spec must be >= simple minimums, not device's defaults.
Fixes #13159.
2025-06-01 02:56:59 -04:00
Ryan C. Gordon
14a4ae521a pulseaudio: Request more recording data per-fragment.
This seems to help some devices that can't keep up with smaller fragment sizes
for whatever reason.

Fixes #13110.
2025-06-01 02:46:55 -04:00