279 Commits

Author SHA1 Message Date
Ethan Lee
efea62ed61 hidapi: Add a stub driver for Switch 2.
Thanks to kiddkaffeine for the Xcode updates!
2025-08-28 09:10:47 -07:00
Simon McVittie
40b941c826 hints: Rephrase documentation to improve grammar
"This thing allows to do something" is not really grammatically correct.
The closest rephrasing would be "allows one to do something" or "allows
the user to do something", but I think the passive voice reads more
naturally here.

Detected by Debian's lintian QA tool.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2025-08-07 13:55:15 -07:00
Ryan C. Gordon
07ef532681 hints: Renamed SDL_HINT_LOG_BACKENDS to SDL_DEBUG_LOGGING.
This still logs backend choices, but we might use it for other things. For
example, what Android device is being used, or all the devices we enumerated,
etc.

Ideally this eventually logs all the stuff we often have to ask followup
questions about.
2025-07-22 13:19:30 -04:00
SDL Wiki Bot
504107ad0e Sync SDL3 wiki -> header
[ci skip]
2025-07-16 01:36:42 +00:00
mitchellcairns
18eeaea054 Implement SInput Device Support (#13343)
This implements a new SDL HID driver for a format developed by Hand Held Legend for their gamepad devices called SInput

Devices that are supported by this change with well-defined mappings

GC Ultimate ( https://gcultimate.com )
ProGCC ( https://handheldlegend.com/products/progcc-kit-wireless-wired-bundle )

The SInput format is documented here: https://github.com/HandHeldLegend/SInput-HID
2025-07-15 18:35:47 -07:00
SDL Wiki Bot
d5efb11f97 Sync SDL3 wiki -> header
[ci skip]
2025-07-14 23:50:35 +00:00
Ryan C. Gordon
10004ab0ea hints: Added SDL_HINT_LOG_BACKENDS.
Fixes #13354.
2025-07-14 19:49:38 -04:00
nightmareci
9e6a6c01e4 Add support for floating point main callback rates 2025-07-01 13:31:39 -04:00
Sam Lantinga
aa870d511e Disable SDL_HINT_JOYSTICK_RAWINPUT by default
Windows can get in a state when it stops reporting raw input events for game controllers until reboot.

The downside of this change is that we lose support for trigger rumble and are limited to 4 controllers again, but if that's important for your application you can use SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, true) to enable this functionality.

Fixes https://github.com/libsdl-org/SDL/issues/13047
2025-05-27 09:51:48 -07:00
bakatrouble
354895d975 Add Flydigi VADER 4 Pro HIDAPI support (#12874) 2025-05-22 09:56:17 -07:00
SDL Wiki Bot
11e1d4a145 Sync SDL3 wiki -> header
[ci skip]
2025-05-01 18:05:25 +00:00
Vicki Pfau
00f3a82ada Joystick: Add new GIP driver to replace old Xbox One wired driver
This new driver is based on official documentation released by Microsoft in
September, though it still lacks several important features, notably the
Security handshake for wireless dongles and audio support. It is, however, more
reliable and extensible than the old driver.
2025-05-01 11:04:33 -07:00
Sam Lantinga
3aed80cd82 Updated documentation for SDL_HINT_GPU_DRIVER 2025-04-22 08:58:44 -07:00
SDL Wiki Bot
bcacc37e3e Sync SDL3 wiki -> header
[ci skip]
2025-03-31 16:56:54 +00:00
8BitDo
e18c6bd2e7 8BitDo (#12661)
Added HIDAPI support for the 8BitDo Ultimate 2 Wireless Controller running firmware v1.03 or newer over Bluetooth.
2025-03-31 09:56:01 -07:00
Katharine Chui
35c03774f3 [SDL3] Adding input and FFB support for Logitech G29(PS3) on hidapi (#11598)
These changes enable the Logitech G29 wheel to run on hidapi with both SDL_Joystick and SDL_Haptic interfaces.

While it is already possible to use the wheel on Linux in WINE + SDL2 thanks to the in-tree evdev driver as well as new-lg4ff, these set of changes allow the G29 to be used with WINE under MacOS and FreeBSD

These wheels should also be supported, but I can only test them from G29's compat modes: G27, G25, DFGT, DFP, DFEX

Haptic and led support are ported from https://github.com/berarma/new-lg4ff
2025-03-17 07:24:39 -07:00
Frank Praznik
1a2fccc56a hints: The auto mode switching hint is for 3.4.0
This is a feature addition with a slight behavior change, not a bug fix, so move it to 3.4.0.
2025-03-14 14:12:15 -04:00
SDL Wiki Bot
285fa671aa Sync SDL3 wiki -> header
[ci skip]
2025-03-14 17:46:58 +00:00
Frank Praznik
0bfe0497f3 video: Add a hint to disable auto mode switching if an exclusive fullscreen window moves between displays
The existing behavior helps clients that don't expect exclusive fullscreen windows to move by maintaining a consistent size and mode, however, some are aware that this can occur and want to handle mode selection themselves.

Add a hint to disable auto mode switching when an exclusive fullscreen window moves to accommodate this use case, and don't override fullscreen changes that may occur in an event watcher between the display changed event being posted and SDL running the display changed handler, as the mode switch may have already been handled there by the client.
2025-03-14 13:46:00 -04:00
Temdog007
17b84dbcf3 emscripten: add window properties for canvas ID and keyboard element (#12509)
Move hints used by Emscripten to window properties. This change will be necessary if multiple windows for Emscripten will be supported in the future.

- Added Window Create Property SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_CANVAS_ID
- Added Window Create Property SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_KEYBOARD_ELEMENT
- Use hint SDL_HINT_EMSCRIPTEN_CANVAS_SELECTOR as override to SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_CANVAS_ID
- Use hint SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT as override to SDL_PROP_WINDOW_CREATE_EMSCRIPTEN_KEYBOARD_ELEMENT
2025-03-14 09:39:46 -07:00
SDL Wiki Bot
f01bcaeb17 Sync SDL3 wiki -> header
[ci skip]
2025-03-05 17:08:00 +00:00
Sam Lantinga
fe9bdcf508 Added SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT 2025-03-05 09:07:05 -08:00
SDL Wiki Bot
0a592b78c1 Sync SDL3 wiki -> header
[ci skip]
2025-02-24 23:12:58 +00:00
Tomasz Pakuła
58388e8db4 Add SDL_HINT_JOYSTICK_HAPTIC_AXES
Allows users to overwrite the number of haptic axes defined for a given
joystick. Also supports a "wildcard" VID:PID of `0xFFFF/0xFFFF`
2025-02-24 15:12:04 -08:00
SDL Wiki Bot
6cb3d37a2b Sync SDL3 wiki -> header
[ci skip]
2025-02-06 20:11:12 +00:00
Petar Popovic
80653a42c7 Remove non-ASCII character from public header SDL_hints.h 2025-02-06 12:10:16 -08:00
Petar Popovic
8ccf85c59e Formatting spaces around pointer symbol. 2025-02-03 17:03:26 -08:00
Sam Lantinga
ed2920afef All SDL 3.0 release symbols are at version 3.2.0 2025-01-21 10:19:21 -08:00
Ryan C. Gordon
7a5604cf0c Sync SDL3 wiki -> headers. 2025-01-21 13:12:25 -05:00
SDL Wiki Bot
f16c67115d Sync SDL3 wiki -> header
[ci skip]
2025-01-21 16:29:55 +00:00
Ryan C. Gordon
c45c4a5e51 render: SDL_HINT_RENDER_DRIVER now accepts a comma-separated list.
Fixes #11077.
2025-01-21 11:29:00 -05:00
SDL Wiki Bot
c4c0bfdfb1 Sync SDL3 wiki -> header
[ci skip]
2025-01-20 04:34:56 +00:00
William Hou
7133969e3a Feature add hint to remap option as alt key (#12021) 2025-01-19 20:34:04 -08:00
Sam Lantinga
923123a527 emscripten: Let SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT accept "#none"
This is used to say "don't even try to listen for keypresses," for apps that
are managing this outside of SDL.

Fixes #10292.
2025-01-18 06:19:27 -08:00
Ryan C. Gordon
6a72d32d41 emscripten: Let SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT accept "".
This is used to say "don't even try to listen for keypresses," for apps that
are managing this outside of SDL.

Fixes #10292.
2025-01-18 08:43:55 -05:00
Ryan C. Gordon
dabc93a631 pen: Send virtual mouse and touch events for pen input.
Fixes #11948.
2025-01-15 02:19:59 -05:00
SDL Wiki Bot
438075a83a Sync SDL3 wiki -> header
[ci skip]
2025-01-13 17:38:58 +00:00
Frank Praznik
b4562c0243 cocoa: Add a hint to control menu visibility in fullscreen spaces windows
Adds SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY to control whether or not the menu can be accessed when the cursor is moved to the top of the screen when a window is in fullscreen spaces mode.

The three values are true, false, and 'auto' (default), with auto resulting in a hidden menu if fullscreen was toggled programmatically, and the menu being accessible if fullscreen was toggled via the button on the window title bar, so the user has an easy way back out of fullscreen if the client app/game doesn't have a readily available option to toggle it.
2025-01-13 12:37:16 -05:00
expikr
9a83fa026d apply multiplier scale after system scale 2025-01-12 08:24:41 -08:00
SDL Wiki Bot
ea859fba3a Sync SDL3 wiki -> header
[ci skip]
2025-01-12 16:07:12 +00:00
Sam Lantinga
551510c0eb SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE can be combined with SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE 2025-01-12 08:05:51 -08:00
SDL Wiki Bot
c7584df999 Sync SDL3 wiki -> header
[ci skip]
2025-01-06 16:17:26 +00:00
Ryan C. Gordon
1f54b228ff video: Convert some EGL environment variables to SDL hints.
Fixes #10479.
2025-01-06 11:15:26 -05:00
SDL Wiki Bot
9b40d43b1f Sync SDL3 wiki -> header
[ci skip]
2025-01-03 22:37:37 +00:00
Frank Praznik
85851459d6 docs: Note that using the Wayland display scaling mode can have imprecision when positioning due to unit conversion and rounding 2025-01-03 17:36:36 -05:00
Sam Lantinga
c077b7a918 Fixed the version availability of SDL_HINT_JOYSTICK_ENHANCED_REPORTS 2025-01-02 17:28:45 -08:00
SDL Wiki Bot
0b520cd4b4 Sync SDL3 wiki -> header
[ci skip]
2025-01-03 01:18:56 +00:00
Sam Lantinga
2c0a8363a5 Added SDL_HINT_JOYSTICK_ENHANCED_REPORTS
This hint defaults on, enabling advanced controller features.

This replaces SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE and SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, and is supported by PlayStation and Nintendo Switch controllers.

Fixes https://github.com/libsdl-org/SDL/issues/10086
2025-01-02 17:18:09 -08:00
Sam Lantinga
4797970bfa Enable SDL_HINT_JOYSTICK_THREAD by default
If you're not using SDL for video you won't get raw input messages without this hint, and this is tripping up enough people it makes sense to have this enabled by default. There isn't much downside to this, other than having another thread processing Xbox controller input.

Fixes https://github.com/libsdl-org/SDL/issues/10576
2025-01-02 10:25:18 -08:00
Sam Lantinga
f2074d7af3 Updated copyright for 2025 2025-01-01 07:45:52 -08:00