Sam Lantinga
4b19f7e012
Added support for the 8BitDo Ultimate 2C Wireless in Bluetooth mode
...
Closes https://github.com/libsdl-org/SDL/pull/11415
(cherry picked from commit c7d1fd90ea )
2025-01-18 07:07:12 -08:00
Sam Lantinga
91b76f5c29
Fixed potentially overlapping memcpy() to use memmove()
2025-01-14 14:34:29 -08:00
Sam Lantinga
2b5b8fdbd5
Updated copyright for 2025
2025-01-01 07:47:53 -08:00
Sam Lantinga
ddfdb0ca7b
Don't overwrite non-CRC gamepad mapping with a new mapping that specifies a CRC
...
Fixes https://github.com/libsdl-org/SDL/issues/11723
(cherry picked from commit 1413bfb185 )
2024-12-26 20:20:39 -08:00
Sam Lantinga
7f880c9121
Fixed crash if the controller product name is NULL
...
This happens when the Razer Synapse software emulates a controller with a keyboard
(cherry picked from commit 7117d545a3 )
2024-12-17 16:54:55 -08:00
Sam Lantinga
74ff82f4a2
Support multiple joystick buttons bound to the same gamepad button
...
(cherry picked from commit ed943318e2 )
2024-11-05 11:50:18 -08:00
Sam Lantinga
3b7a45853c
Fixed the PS5 controller face buttons on Amazon Fire TV, Android 11
...
(cherry picked from commit 09495059df )
2024-10-30 05:23:54 -07:00
Sam Lantinga
b6fa4dc794
Only use Steam Virtual Gamepads if we're running under Steam
...
Fixes https://github.com/libsdl-org/SDL/issues/11214
Fixes https://github.com/libsdl-org/SDL/issues/11215
(cherry picked from commit 8a30def5f2 )
2024-10-16 17:51:50 -07:00
Sam Lantinga
cfb3db01dc
Added support for the Steam Virtual Gamepad on macOS Sequoia
...
(cherry picked from commit d7b1ba1bfc )
2024-10-16 17:51:50 -07:00
Sam Lantinga
da19244f7f
Added support for wired XBox controllers on macOS 15.0 Sequoia
...
Fixes https://github.com/libsdl-org/SDL/issues/11002
(cherry picked from commit 7da728a642 )
2024-10-07 16:41:34 -07:00
Sam Lantinga
bb33eb409e
Fixed detecting the Steam Virtual Gamepad on macOS
2024-10-07 16:21:44 -07:00
Cameron Gutman
656b599828
Throttle tickle reports to PS4/PS5 controllers
...
UpdateDevice() can be called at an arbitrary rate, so we need to
pace ourselves to avoid filling up the rumble queue with these.
(cherry picked from commit 6ec8b1a173 )
2024-09-25 07:21:31 -07:00
T3hD0gg
ec9a9fee58
Add Thrustmaster TMX VID & PID to wheel device list.
...
(cherry picked from commit 594edb6bd2 )
2024-09-18 22:22:01 -07:00
Sam Lantinga
f5ed158d1f
SDL_XINPUT_Enabled() returns false until XInput DLL is successfully loaded
...
We make sure we initialize XInput first, so that anything checking whether it's enabled gets a valid result based on whether we were able to load it or not.
(cherry picked from commit 8f46cb771c )
2024-09-06 11:24:43 -07:00
Sam Lantinga
5aadfd4eaf
Fixed race condition at startup that could cause a crash in the XInput driver
...
(cherry picked from commit 6d7c211faf )
2024-09-06 10:17:37 -07:00
Ozkan Sezer
4eac44bed4
RAWINPUT_JoystickOpen: add missing SDL_stack_free() calls.
...
Fixes https://github.com/libsdl-org/SDL/issues/10574 .
(cherry picked from commit 845212388e )
2024-08-25 11:05:50 +03:00
Sam Lantinga
0de601dc64
Added support for the Retro-bit Controller in PS3 mode
...
Fixes https://github.com/libsdl-org/SDL/issues/10557
(cherry picked from commit e75175129f )
2024-08-19 16:47:54 -07:00
Anonymous Maarten
248cb3ca9c
Fix -Wdeclaration-after-statement warnings
2024-08-14 10:35:43 +00:00
KaJe
5ecbc00f36
Add Cammus C12 VID & PID to wheel device list.
...
Add Cammus C12 in the SDL wheel list to enable wheel detection for them.
(cherry picked from commit e1571d704d )
2024-08-09 06:48:49 -07:00
Sam Lantinga
7fdf794377
Fixed crash with joystick rumble after disconnection
...
This prevents continuing a rumble after the first one fails, and fixes a long standing crash issue if rumble is started immediately before the controller is disconnected.
Thanks to @AntTheAlchemist for the key bug report that showed what was happening here.
Fixes https://github.com/libsdl-org/SDL/issues/10422
(cherry picked from commit 0a924b185d )
2024-07-29 13:50:55 -07:00
Sam Lantinga
15c73f5bfe
Fixed whitespace
...
(cherry picked from commit 67b973b5fa )
2024-07-29 12:52:40 -07:00
Amir
ccade50587
Fix warning for Android NDK compiler: "function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]"
...
https://stackoverflow.com/questions/42125/warning-error-function-declaration-isnt-a-prototype
In C int foo() and int foo(void) are different functions. int foo() accepts an arbitrary number of arguments, while int foo(void) accepts 0 arguments. In C++ they mean the same thing.
2024-07-17 10:51:30 -07:00
ceski
3b7eafedb3
Add a Windows mapping for SplitFish Game Controller
...
(cherry picked from commit 68cf17d0d4 )
2024-07-12 22:04:29 -07:00
Sam Lantinga
4c44450258
Improved detection of Nintendo Switch Pro controller report mode
...
Fixes https://github.com/libsdl-org/SDL/issues/10182
(cherry picked from commit 4ba2e9f4f4 )
2024-07-06 05:30:08 -07:00
Max Maisel
22770e6496
Drain HIDAPI buffer in SDL_hidapi_steamdeck.c.
...
Add a loop around SDL_hid_read() in the Steam Deck HIDAPI driver as it
is done in other HIDAPI drivers. This loop reads data from the device and
processes it until the input buffer is empty which ensures that clients
always get the latest data.
This fixes an input latency issue if the application polls the events
slower than the hardware generates them.
2024-07-05 08:27:09 -07:00
Sam Lantinga
845ebbbe96
Added support for the ROG RAIKIRI
...
(cherry picked from commit a04596c9a7 )
2024-07-03 13:54:31 -07:00
Sam Lantinga
cd8ea5e3f1
Only use the default gamepad mapping if an automatic mapping isn't available
...
Fixes https://github.com/libsdl-org/SDL/issues/10162
(cherry picked from commit 0f8054cf87 )
2024-07-03 11:47:20 -07:00
Sam Lantinga
ee3b2b7de1
Make sure we don't try to use the XInput DLL after it's unloaded
...
Steam ran into a crash SDL_XINPUT_JoystickDetect() with XINPUTGETCAPABILITIES being NULL. I'm not sure how that happened, and there may still be a race condition if this is a multi-threaded issue, but at least this is more correct.
(cherry picked from commit 0ae4fd0ec9 )
2024-06-26 15:55:31 -07:00
Sam Lantinga
a6fdd155fb
Pass through the original name used by the Steam Virtual Gamepad
...
Proton uses this on Linux to determine what the XInput slot is for the gamepad. Other applications will get the real controller name and VID/PID by virtue of the code in SDL_steam_virtual_gamepad.c
(cherry picked from commit 361cae0874 )
2024-06-17 12:14:59 -07:00
rfht
177dfddaf7
simplify OpenBSD D-pad calculation with bitwise operation ( #7996 )
...
(cherry picked from commit 4d63c919f9 )
2024-06-16 05:56:35 -07:00
Sam Lantinga
169f77ed5e
Re-enable full controller reports for Joy-Con controllers
...
When they are in simple report mode, the thumbstick gets turned into a digital hat, so let's use them in full report mode.
(cherry picked from commit bf27269952 )
2024-06-13 00:02:00 -07:00
Sam Lantinga
6b9bf71133
Try to guess the type of a Nintendo Switch controller if we can't read the device info
...
(cherry picked from commit 6619de8f24 )
2024-06-13 00:01:40 -07:00
Sam Lantinga
f1b19aa744
Ignore spurious reply packets when reading Nintendo Switch controller reports
...
(cherry picked from commit 5ee9a840b1 )
2024-06-12 23:59:07 -07:00
Oleg
0f9191a643
Added VRS DirectForce Pro wheelbase VID/PID to wheel devices list
...
(cherry picked from commit 7529b4bed5 )
2024-06-06 09:54:40 -07:00
Sam Lantinga
f520062ad1
Fixed PlayStation detection interrupting input for the Logitech K400 keyboard
...
Also added the Logitech Chillstream to the list of PS3 controllers and fixed the right shoulder axis.
(cherry picked from commit b6d7adfec1 )
2024-06-05 19:29:48 -07:00
Sam Lantinga
e2f597de84
Added support for the Saitek Cyborg V.3 Rumble Pad in PS3 mode
...
(cherry picked from commit b6ca360228 )
2024-06-05 19:28:26 -07:00
Sam Lantinga
35d719ef25
Added support for the Razer Kitsune in PS5 mode
...
(cherry picked from commit e3beaa1972 )
2024-05-31 15:18:46 -07:00
Sam Lantinga
964e0c9b47
Added Linux bindings for the Qanba Drone 2 Arcade Joystick
...
(cherry picked from commit 98a9ca5e32 )
2024-05-23 15:35:03 -07:00
Oleg
96e3799495
Added Moza wheelbases VID/PID to wheel devices list
...
(cherry picked from commit 79cabeef18 )
2024-05-15 19:40:34 -07:00
Oleg
1f54ee1da6
Added Simucube wheelbases VID/PID to wheel devices list
...
(cherry picked from commit dc9d9dd85a )
2024-05-15 19:40:34 -07:00
Oleg
0c7a83ecd5
Added Cammus C5 wheelbase VID/PID to wheel devices list
...
(cherry picked from commit ce9177b64f )
2024-05-15 19:40:34 -07:00
Sam Lantinga
efaa58732a
Don't enable enhanced report mode for Bluetooth Nintendo Switch controllers by default
...
This breaks applications using them in DirectInput mode, which isn't worth just getting battery status. We'll turn on enhanced mode if the application enables sensors.
(cherry picked from commit a87fa020ac )
2024-05-10 12:19:18 -07:00
Ryan C. Gordon
7d60ff9965
SDL_JoystickEventState: Make documentation and implementation match.
...
This changes the `SDL_EVENTS_DISABLED` path's return value from SDL_DISABLE
to SDL_IGNORE to match expectations, but doesn't actually change the ABI,
since these two symbols are both zero.
Fixes https://github.com/libsdl-org/sdlwiki/issues/460
2024-05-08 16:41:58 -04:00
Sam Lantinga
8c92af5e54
Added a Windows mapping for the SPEEDLINK STRIKE Gamepad
...
Fixes https://github.com/libsdl-org/SDL/issues/9705
(cherry picked from commit 01d560df50 )
2024-05-06 10:11:39 -07:00
Sam Lantinga
67c60e0b9c
Fixed build error (thanks @sezero!)
...
(cherry picked from commit ac5a61cd60 )
2024-04-25 09:45:36 -07:00
Tyson Whitehead
45b804c158
Avoid opening non-joystick devices if possible to speedup scanning
...
Closing a device file takes 0.01 to 0.5s, which can add up to
significant startup delays. The udev classification does not
require opening the actual device files, so, use it if possible,
and only fall back to opening the device and probing otherwise.
2024-04-25 08:47:55 -07:00
Tyson Whitehead
0963c11af8
Initialize udev before joystick manual scan so class lookup works
...
LINUX_JoystickInit does a manual scan first so devices are sorted.
If SDL_UDEV_Init hasn't run by then, then the product info cannot
be looked up by SDL_UDEV_GetProductInfo and the initial-plugged-
in-device classification falls back to heuristic guessing.
2024-04-25 08:47:55 -07:00
yassineimounachen
8f18e2f52d
Add USB IDs for the Thrustmaster TS-XW racing wheel
...
To be of use, this depends on https://github.com/berarma/oversteer/pull/200 and https://github.com/Kimplul/hid-tmff2/pull/94 .
(cherry picked from commit 5ffb2f47d1 )
2024-04-22 11:36:30 -07:00
Sam Lantinga
5fff9bc1e3
Don't fail joystick initialization if udev isn't available
2024-03-25 11:45:41 -07:00
Alynne
cbc9bd9804
Add Yawman Arrow flightstick controller
...
(cherry picked from commit 2b4c75690c )
2024-03-25 06:35:32 -07:00