Sam Lantinga
e7332cd814
Fixed zero CRC matching in the controller mapping database
2022-08-24 15:28:56 -07:00
Sam Lantinga
b6a3d76225
Look up mappings by GUID in two passes: first with CRC, second without
2022-08-23 07:24:21 -07:00
Sam Lantinga
c1e0873940
Added the CRC of the joystick name to the GUID
...
This will make it possible to have mappings for different controllers
that have the same VID/PID. This happens frequently with some generic
controller boards that have been reused in many products.
Fixes https://github.com/libsdl-org/SDL/issues/6004
2022-08-22 18:22:35 -07:00
Sam Lantinga
b2819e43a7
Send SDL_CONTROLLERDEVICEREMOVED for all joysticks because we don't know after the fact whether it was a game controller.
...
Fixes https://github.com/libsdl-org/SDL/issues/2092
2022-08-22 13:10:57 -07:00
Sam Lantinga
bf925b9ecd
Fixed build
2022-08-11 14:41:48 -07:00
Sam Lantinga
24f97dd700
Added an SDL error to SDL_GameControllerMapping* functions
2022-08-11 14:39:49 -07:00
Sam Lantinga
28c01955bc
Fixed button mapping for the HORIPAD S
...
This controller actually comes in at least two flavors: a GameCube controller and an arcade pad, neither of which should have the face buttons remapped.
2022-08-04 10:46:37 -07:00
Sam Lantinga
57c3b2c950
Don't rely on the device VID/PID to get the Nintendo controller type
...
The Nintendo Online Sega Genesis controller reports the SNES VID/PID over Bluetooth. This is a more robust way of handling future controllers as well, so let's go with this instead.
Also use full reports over Bluetooth, and don't report gyro for Nintendo Online classic controllers.
2022-08-03 21:31:12 -07:00
Sam Lantinga
29cdb2c9c9
Added support for the Nintendo Switch Joy-Con Charging Grip
2022-08-03 18:01:10 -07:00
Sam Lantinga
875b737c64
Added support for the Nintendo Online NES Controllers to the HIDAPI driver
2022-07-28 21:40:01 -07:00
Sam Lantinga
2fa2f9ff77
Greatly improved Nintendo Joy-Con support using the HIDAPI driver
...
* Added support for mini-gamepad mode for Joy-Con controllers, matching the mapping for hid-nintendo on Linux and iOS 16
* Added the ability to merge left and right Joy-Con controllers into a single Pro-style controller
* Added the hint SDL_HINT_JOYSTICK_HIDAPI_SWITCH_COMBINE_JOY_CONS to control this merging functionality
* Removed the hint SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS
2022-07-28 19:22:27 -07:00
diddily
0ec5bb4e6d
Add missing controller events to SDL_GameControllerEventState()
...
Events to handle controller touchpads and sensors were added to the library but not added in `SDL_GameControllerEventState()`. This change adds the missing events.
2022-07-25 08:55:17 -07:00
Sam Lantinga
e24b971a34
Added support for the NVIDIA Shield controller guide button
2022-07-12 17:53:03 -07:00
Cameron Gutman
6e712d2440
joystick: Add HIDAPI driver for NVIDIA SHIELD 2017 controller
...
Basic input already works using the OS HID driver, but this enables
force feedback and battery state reporting.
2022-07-10 10:53:26 -07:00
chalonverse
3b191580c3
Windows GDK Support ( #5830 )
...
* Added GDK
* Simplfied checks in SDL_config_wingdk.h
* Added testgdk sample
* Added GDK readme
* Fixed error in merge of SDL_windows.h
* Additional GDK fixes
* OpenWatcom should not export _SDL_GDKGetTaskQueue
* Formatting fixes
* Moved initialization code into SDL_GDKRunApp
2022-06-27 10:19:39 -07:00
Sam Lantinga
68544be44b
Added support for the Nintendo Online controllers
2022-06-10 11:31:59 -07:00
Sam Lantinga
c7f4103807
Special case for k_eControllerType_XInputSwitchController in the raw input path
2022-06-09 13:47:29 -07:00
Sam Lantinga
e6cb082232
Fixed the default mapping on Windows for the HORI Fighting Commander
2022-06-09 13:20:38 -07:00
Sam Lantinga
423141bfca
Added a function to get the controller firmware version
2022-06-03 18:50:00 -07:00
Sam Lantinga
7fa46ec40b
The Google Pixel fingerprint sensor also shows up on Linux when running on the phone
2022-05-31 11:11:19 -07:00
Sam Lantinga
47f1cb550d
Fixed picking up the correct mapping for virtual controllers on Android
...
Fixes https://github.com/libsdl-org/SDL/issues/5662
2022-05-18 23:48:15 -07:00
Sam Lantinga
94eeb587c1
First pass at extending virtual controller functionality
...
Added the ability to specify a name and the product VID/PID for a virtual controller
Also added a test case to testgamecontroller, if you pass --virtual as a parameter
2022-05-15 20:01:12 -07:00
Sam Lantinga
7ad15c5b8f
Added game controller support for virtual joysticks
...
Fixes https://github.com/libsdl-org/SDL/issues/5662
2022-05-15 09:35:52 -07:00
Sam Lantinga
e551384a99
Added functions to get the platform dependent name for a joystick or game controller
2022-04-26 14:54:14 -07:00
Sam Lantinga
120c76c84b
Updated copyright for 2022
2022-01-03 09:40:21 -08:00
Ozkan Sezer
61107494a1
SDL_gamecontroller.c: (unsigned char) cast to SDL_isdigit() parameters.
2021-12-17 07:40:02 +03:00
Sam Lantinga
a2e8565230
The Google Pixel fingerprint sensor isn't actually a joystick
...
Fixes https://github.com/libsdl-org/SDL/issues/4971
2021-11-26 11:04:15 -08:00
Sam Lantinga
6828955ddf
Trim any extra platform strings from mappings when they're returned to the application
2021-11-19 09:58:11 -08:00
Cameron Gutman
fe09a4930a
joystick: Add APIs to query rumble support
2021-11-11 15:10:08 -08:00
Sam Lantinga
301389cecc
Fixed iOS build
2021-11-07 13:53:12 -08:00
Sam Lantinga
0323d983c6
Add the platform to the game controller mapping so it can be read back in without changes
...
Fixes https://github.com/libsdl-org/SDL/issues/4848
2021-11-07 12:52:48 -08:00
Sam Lantinga
86bc65a741
Fixed non-Apple builds
2021-11-07 11:35:12 -08:00
Sam Lantinga
9fdb06450d
Added support for the Joy-Con Charging Grip when SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS is enabled
2021-08-04 11:34:06 -07:00
Sam Lantinga
2dfc92ca1e
Added default mapping for WGI game controllers
2021-08-03 09:25:13 -07:00
Sam Lantinga
993a56766d
Only use the default Xbox mapping on Linux
...
On Windows, this is already covered by XInput and is the wrong mapping if we try to use it with DirectInput/RAWINPUT/WGI controllers
2021-08-03 00:15:24 -07:00
Sam Lantinga
a186a503e7
Added SDL_GameControllerGetSensorDataRate() to get the sensor update rate for a controller.
2021-07-29 06:43:39 -07:00
Sam Lantinga
09d1cea733
Use the new controller type for the Luna and Stadia controllers
2021-07-24 11:15:09 -07:00
Sam Lantinga
808c3ae612
Allow mapping Android controllers that just have a D-PAD and face buttons
...
This fixes bug https://github.com/libsdl-org/SDL/issues/4327
2021-07-24 10:37:42 -07:00
Sam Lantinga
d135c0762f
Added SDL_GameControllerSendEffect() and SDL_JoystickSendEffect() to allow applications to send custom effects to the PS4 and PS5 controllers
...
See testgamecontroller.c for an example of a custom PS5 trigger effect
2021-07-08 13:22:41 -07:00
Sam Lantinga
430bbcb87f
Added HIDAPI support for the Amazon Luna Controller connected over USB in DirectInput mode
2021-07-07 09:49:33 -07:00
Sam Lantinga
863f566941
Fixed reading thumbstick axes and mic button on the Amazon Luna Controller firmware version 305164320
2021-07-07 08:55:16 -07:00
Dimitriy Ryazantcev
39302c9214
Add Steam Virtual Gamepad and Xbox 360 Wired Controller defines instead of magic values
...
See https://partner.steamgames.com/doc/features/steam_controller/steam_input_gamepad_emulation_bestpractices for details on what is Steam Virtual Gamepad.
2021-06-30 08:48:13 -07:00
Sam Lantinga
afd100f02b
Added support for the PowerA Fusion Pro 2 and the PDP Xbox Series X Afterglow and Blue controllers
2021-06-18 17:37:46 -07:00
JibbSmart
ee52624f95
Switch Joy-Con SL and SR buttons are now mapped to matching paddle positions so that all buttons can be accessed when using SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS
2021-02-22 17:54:32 -08:00
Sam Lantinga
1a17ab30e1
Added mappings for popular controllers on Chromebooks
2021-02-21 11:03:26 -08:00
Sam Lantinga
85235985fb
Fixed detecting the paddles on the Xbox Elite Series 1 controller
2021-02-10 10:22:19 -05:00
Sam Lantinga
1981d23f4b
Fixed bug 5466 - Add haptic support for Stadia Controller
...
Dimitriy Ryazantcev
Consider adding support for Stadia Controller haptics.
Here is example code how to deal with it:
99314be815/device/gamepad/hid_haptic_gamepad.cc (L45)
2021-01-24 00:51:26 -05:00
Sam Lantinga
f68b36df75
Added support for the EVORETRO GameCube Adapter in PC mode
2021-01-24 00:51:25 -05:00
Sam Lantinga
178ae70a29
Don't add paddle mappings for the Xbox One Elite Series 1 controller, since they can't be unmapped and read directly on that controller.
2021-01-24 00:51:24 -05:00
Sam Lantinga
2ea393bd83
Fixed the screenshot button mapping on third party Bluetooth Nintendo Switch Pro controllers
2021-01-24 00:51:23 -05:00