|
68544be4
|
2022-06-10T11:31:59
|
|
Added support for the Nintendo Online controllers
|
|
d7c07d6b
|
2022-04-27T00:57:17
|
|
Read motion sensor scale from Switch controllers (#5555)
* Read IMU scale data from Switch controllers. Up until now, SDL has used hard-coded scaling which isn't correct with some supported controllers.
* Moved declarations to beginning of code blocks to better fit with SDL style requirements
|
|
0964c84d
|
2022-02-02T11:21:32
|
|
Always use SDL_PrivateJoystickBatteryLevel to update battery level
But do not use it for initialisation.
|
|
60deadba
|
2022-01-17T17:22:30
|
|
re-use return value of SDL_SetError/WIN_SetErrorFromHRESULT/SDL_OutOfMemory
|
|
120c76c8
|
2022-01-03T09:40:00
|
|
Updated copyright for 2022
|
|
66058bbb
|
2021-11-15T16:52:56
|
|
Fixed exception accessing Bluetooth devices on Android 12
Since accessing Bluetooth prompts the user for permission on both Android and iOS, and we only need it for Steam Controller support, we'll leave it off by default. You can enable it by setting the hint SDL_HINT_JOYSTICK_HIDAPI_STEAM to "1" before calling SDL_Init()
Fixes https://github.com/libsdl-org/SDL/issues/4952
|
|
a2c27d39
|
2021-11-13T17:56:28
|
|
SDL_hidapi_switch.c (ConstructSubcommand): lose use of '&' on rumbleData
SwitchCommonOutputPacket_t->rumbleData is an array.
|
|
afccabb8
|
2021-11-11T12:12:05
|
|
joystick: Add capability flags for rumble and trigger rumble
When API limitations force us to guess, we favor a false positive (reporting
support when it doesn't exist) compared to a false negative.
|
|
1ccfbf96
|
2021-11-11T11:13:08
|
|
joystick: Convert HasLED() into a generic GetCapabilities() function
|
|
5b646cd1
|
2021-11-07T22:58:44
|
|
Build hidapi code into SDL as a new public API
This prevents conflicts with hidapi linked with applications, as well as allowing applications to make use of HIDAPI on Android and other platforms that might not normally have an implementation available.
|
|
fe2fe290
|
2021-11-07T11:48:16
|
|
Backed out accidentally committed PR https://github.com/libsdl-org/SDL/pull/4849
|
|
86bc65a7
|
2021-11-07T11:35:12
|
|
Fixed non-Apple builds
|
|
345c161f
|
2021-09-22T09:06:45
|
|
Fixed some accidental uses of external C runtime functions
|
|
503ea8e8
|
2021-08-25T14:41:58
|
|
Don't modify the Nintendo Switch home LED state by default
|
|
9fdb0645
|
2021-08-04T11:33:28
|
|
Added support for the Joy-Con Charging Grip when SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS is enabled
|
|
b3a0174b
|
2021-07-29T14:23:15
|
|
Scale the values correctly based on the sensor type (thanks @meyraud705)
|
|
a186a503
|
2021-07-29T06:43:39
|
|
Added SDL_GameControllerGetSensorDataRate() to get the sensor update rate for a controller.
|
|
8d527def
|
2021-07-26T10:18:18
|
|
Revert "hidapi_switch: Implement HD rumble effect (#4538)"
This reverts commit 19082b115b8ba3fff93e1c317c380718086a509c, which broke rumble on the Nintendo Switch Pro controller
|
|
19082b11
|
2021-07-26T12:00:53
|
|
hidapi_switch: Implement HD rumble effect (#4538)
|
|
3c9559f7
|
2021-07-24T19:43:56
|
|
Don't try to rumble third-party Nintendo Switch Pro controllers
Sending rumble to the PowerA Spectra Nintendo Switch controller hangs input reports for a couple of seconds.
|
|
e6e8fe6d
|
2021-07-23T10:45:03
|
|
hidapi_switch: Implement analog rumble
|
|
d135c076
|
2021-07-08T13:22:41
|
|
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
|
|
3fcaf5b4
|
2021-05-25T10:33:30
|
|
Fixed incorrect axis scaling for Nintendo Switch controllers
|
|
c287087f
|
2021-02-23T09:26:03
|
|
Only change joystick->nbuttons for Joy-Cons, since they're the only ones that have these "paddles"
|
|
ee52624f
|
2021-02-22T17:23:13
|
|
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
|
|
ac72a2ba
|
2021-01-25T20:38:50
|
|
Fixed bug 5493 - Hint to let the user opt out of having Switch controllers' Home button lit when opened
jibb
New hint to let the user opt out of having Switch controllers' Home button lit when opened.
This is more consistent with the Switch itself (which doesn't light the button normally) and may be preferred by users who may disconnect their controller without letting the application close it.
I think this warrants a Switch-specific hint because the default behaviour is unusual (inconsistent with using a Switch controller on a Switch itself or with some other programs on PC), and because of that it's distinct from other lights (the player number on Switch controllers and the player colour on PlayStation controllers).
|
|
c857b5e0
|
2021-01-23T11:21:01
|
|
Minor cleanup
|
|
0f57864c
|
2021-01-18T19:57:29
|
|
Hint SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS added so we can recognise a Joy-Con as half a Pro Controller, so we can read its analog input and read its sensors just like we do a Pro Controller.
|
|
bdb3e6b8
|
2021-01-15T12:40:00
|
|
SDL_hidapi_switch.c: fix build with older compilers
|
|
e3dbae50
|
2021-01-14T23:49:41
|
|
Get the serial number for the Nintendo Switch Pro controller
|
|
5fc743c4
|
2021-01-14T23:49:37
|
|
Phantom Nintendo Switch Pro Controller initialization problem
|
|
92742306
|
2021-01-14T23:49:33
|
|
Fixed rumble reset failing for Switch Pro controllers in USB mode
|
|
e2f46ed8
|
2021-01-14T23:49:20
|
|
Always lock the HIDAPI device when closing, in case rumble is pending
|
|
e9887045
|
2021-01-11T15:36:40
|
|
Gyro and Accel sensor support for Switch Pro Controller.
Note that axes are changed to match the axes we're using with PlayStation controllers, since users will appreciate consistent behaviour across devices.
|
|
9130f7c3
|
2021-01-02T10:25:38
|
|
Updated copyright for 2021
|
|
5b3616c3
|
2020-11-23T18:24:05
|
|
Generalized the raw input controller driver and moved XInput/WGI detection into it for XInput devices
This fixes bad report parsing for various newer Xbox controllers, and this driver is now preferred over XInput, since it handles more than 4 controllers.
|
|
fcb21aa8
|
2020-11-17T10:30:20
|
|
Added API for sensors on game controllers
Added support for the PS4 controller gyro and accelerometer on iOS and HIDAPI drivers
Also fixed an issue with the accelerometer on iOS having inverted axes
|
|
1e2caac5
|
2020-11-11T18:57:37
|
|
Added SDL_JoystickRumbleTriggers() and SDL_GameControllerRumbleTriggers()
|
|
d1e10c31
|
2020-11-11T14:38:14
|
|
Removed debug output
|
|
009b62f1
|
2020-11-07T02:22:15
|
|
Be explicit about mapping the new game controller paddle buttons
|
|
3a3aaac2
|
2020-11-06T11:30:52
|
|
Added 4 auxiliary buttons to the game controller API
Xbox Elite controllers use AUX1-AUX4 to represent the paddle buttons when using the HIDAPI driver
PS4 and PS5 controllers use AUX1 to represent the touchpad button
Nintendo Switch Pro controllers use AUX1 to represent the capture button
|
|
e555d453
|
2020-11-05T11:07:54
|
|
Added SDL_JoystickHasLED
Currently, this is only supported by the PS4 HIDAPI driver.
|
|
83cddd2e
|
2020-04-30T11:57:29
|
|
Add SDL_JoystickSetLED.
Currently, this is only supported by the PS4 HIDAPI driver.
|
|
2b323855
|
2020-04-17T15:08:48
|
|
Don't send rumble packets too quickly to Nintendo Switch Pro controllers over Bluetooth
|
|
c02f54a0
|
2020-04-17T15:08:46
|
|
Fixed the default face button mapping for Nintendo Switch Pro controllers
|
|
b6afbe63
|
2020-04-07T09:38:57
|
|
Added SDL_log.h to SDL_internal.h so logging is available everywhere
|
|
cb8c91d9
|
2020-03-22T11:01:14
|
|
Fixed bug 5051 - Switch Pro Controller hidapi driver does not report battery levels when connected via Bluetooth
bluenaxela+sdl
I've noticed that the Switch Pro Controller hidapi driver does not report battery levels when connected via Bluetooth, despite having code for setting joystick->epowerlevel.
This is caused by the driver always using k_eSwitchInputReportIDs_SimpleControllerState via Bluetooth. Using that mode means that the state reports you get back from the controller do not include battery state. Not using the full controller state over Bluetooth effectively makes this driver's support for setting joystick->epowerlevel entirely pointless, only ever reporting SDL_JOYSTICK_POWER_WIRED.
Is there a reason this was set to only use SimpleControllerState via Bluetooth?
I've attached a patch I'm using to allow getting battery level for the Switch Pro Controller.
A couple notes about this patch:
1) It changes LoadStickCalibration to accept the input_mode that is selected, because that's really what should determine what is used for stick extents, since stick extents differ between the modes.
2) In my patch I only use FullControllerState when the vid/pid matches the official Switch Pro Controller, as a cautionary measure in case some third-party controllers have problems with FullControllerState mode via Bluetooth (I noticed a HORI Wireless Switch Pad I had seemed to not read controller calibration correctly for stick extents. Maybe it's calibration data was uninitialized on account of having never been used with a Switch? I'm unsure, though if that guess is right maybe SDL2 should be detecting an uninitiated calibration state and using some sensible defaults)
|
|
106ffd57
|
2020-03-20T20:45:30
|
|
Fixed bug 5049 - HORI Wireless Switch Pad does not connect properly via Bluetooth
bluenaxela+sdl
The HORI Wireless Switch Pad does not properly connect via bluetooth. I did some debugging and found that the code that tries to control the Home LED causes this controller to disconnect.
|
|
47da53b9
|
2020-03-16T14:49:20
|
|
Fix compiler warnings
|
|
4dea340c
|
2020-03-16T12:23:38
|
|
Fixed bug 4477 - Support more than 4 XInput-capable devices on Windows
Jimb Esser
Add new RawInput controller API, and improved correlation with XInput/WGI
Reorder joystick init so drivers can ask the others if they handle a device reliably
Do not poll disconnected XInput devices (major perf issue)
Fix various cases where incorrect correlation could happen
Simple mechanism for propagating unhandled Guide button presses even before guaranteed correlation
Correlate by axis motion as well as button presses
Fix failing to zero other trigger
Fix SDL_HINT_JOYSTICK_HIDAPI not working if set before calling SDL_Init()
Add missing device to device names
Disable RawInput if we have a mismatch of XInput-capable but not RawInput-capable devices
Updated to SDL 2.0.13 code with the following notes:
New HID driver: xbox360w - no idea what that is, hopefully urelated
SDL_hidapijoystick.c had been refactored to couple data handling logic with device opening logic and device lists caused some problems, yields slightly uglier integration than previously when the 360 HID device driver was just handling the data.
SDL_hidapijoystick.c now often pulls the device off of the joystick_hwdata structure for some rumble logic, but it appears that code path is never reached, so probably not a problem.
Looks like joystick_hwdata was refactored to not include a mutex in other drivers, maintainers may want to do the same refactor here if that's useful for some reason.
Something changed in how devices get names, so getting generic names.
Had to fix a (new?) bug where removing an XInput controller caused existing controllers (that moved to a new XInput index) to get identified as 0x045e/0x02fd ("it's probably Bluetooth" in code), rendering the existing HIDAPI_IsDevicePresent and new RAWINPUT_IsDevicePresent unreliable.
|
|
fe979921
|
2020-03-10T17:35:14
|
|
Read the buttons on Nintendo Switch and GameCube controllers as they are labeled, and swap them if the applications wants positional button data instead.
|
|
e9bc21fb
|
2020-03-04T17:10:37
|
|
Fixed rumble for third-party Nintento Switch Pro controllers
The 8BitDo SF30 Pro Gamepad will generate a single motor pulse for each rumble message, so we need to do this frequently to have continous rumble on this device.
|
|
428cfddb
|
2020-03-04T14:59:44
|
|
Fixed crash when a controller is disconnected while rumble is pending
|
|
1af31a26
|
2020-02-27T13:53:32
|
|
Fixed trying to handle the HORI Wireless Switch Pad when connected via USB
|
|
833f76ab
|
2020-02-07T11:49:56
|
|
Fixed bug 4968 - NULL passed to memcpy in WriteProprietary in SDL_hidapi_switch.c
meyraud705
In SDL_hidapi_switch.c
line 443: Function BTrySetupUSB call WriteProprietary with pBuf=NULL and ucLen=0
line 376: WriteProprietary check its input (!pBuf && ucLen > 0) || ucLen > sizeof(packet.rgucProprietaryData): ucLen is 0 so it passes
line 382: WriteProprietary call memcpy with pBuf=NULL
|
|
8ba77b35
|
2020-02-07T11:44:57
|
|
Use the asynchronous HIDAPI rumble code for Nintendo Switch Pro controllers
|
|
6efebf17
|
2020-02-04T12:48:53
|
|
Moved rumble expiration to the main joystick handling level, and prevent sending the driver layer duplicate rumble requests.
|
|
9c3d1602
|
2020-01-19T11:43:36
|
|
Refactored code so SDL_GetJoystickGameControllerType() is called less during controller detection
|
|
43aa1fa9
|
2020-01-18T11:21:14
|
|
Added support for detecting previously unknown Xbox 360 and Xbox One controllers using the HIDAPI driver with libusb and Android
|
|
a8780c6a
|
2020-01-16T20:49:25
|
|
Updated copyright date for 2020
|
|
a56aaea1
|
2020-01-07T16:47:56
|
|
Fixed handling the 8BitDo M30 in Nintendo Switch mode
|
|
46e1377d
|
2019-12-20T20:12:03
|
|
Automatically assign player indexes to game controllers, and allow changing the player index for game controllers and joysticks.
Added the functions SDL_JoystickFromPlayerIndex(), SDL_JoystickSetPlayerIndex(), SDL_GameControllerFromPlayerIndex(), and SDL_GameControllerSetPlayerIndex()
|
|
1db56619
|
2019-12-19T18:03:28
|
|
Fixed rare infinite rumble in HIDAPI controller driver
|
|
e22e77da
|
2019-12-19T15:01:35
|
|
Added an untested driver for the Nintendo GameCube adapter, based on code contributed by Ethan Lee
|
|
e7f7e3f4
|
2019-12-19T15:01:30
|
|
Refactored HIDAPI controller code to support dongles and hubs that dynamically attach controllers
|
|
733f2525
|
2019-11-22T14:09:24
|
|
Fixed build
|
|
cf33f1f0
|
2019-11-13T21:53:01
|
|
Added a utility function to simplify the hint handling logic
|
|
9a76bebf
|
2019-11-13T14:24:48
|
|
SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS defaults to true, to match Steam's default behavior
|
|
9da4bfc1
|
2019-10-22T10:57:07
|
|
Added support for the Power A Nintendo Switch Enhanced Wireless Controller
|
|
b3470f04
|
2019-10-17T17:32:47
|
|
Added the hint SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS to control whether Nintendo Switch controllers use their button labels or button positions for game controller button reporting.
|
|
e6ac16ef
|
2019-10-17T16:59:05
|
|
Added support for third party Nintendo Switch controllers that don't support the full protocol
|
|
be6cda9f
|
2019-06-19T15:54:21
|
|
Rolling back GameCube HIDAPI support
It causes the HIDAPI devices to always be opened on enumeration, which causes crashes in the Windows drivers when multiple applications are reading and writing at the same time. We can revisit this after 2.0.10 release.
|
|
82af4276
|
2019-06-08T13:36:59
|
|
hidapi: Use GameCube adapter controller port for player index
The Nintendo USB GameCube adapter has four controller ports. Return
the port number as 0 to 3 from SDL_JoystickGetPlayerIndex() and
SDL_JoystickGetDevicePlayerIndex().
|
|
c5286156
|
2019-03-12T20:27:54
|
|
hidapi: Add support for Wii U/Switch USB GameCube controller adapter.
Note that a single USB device is responsible for all 4 joysticks, so a large
rewrite of the DeviceDriver functions was necessary to allow a single device to
produce multiple joysticks.
|
|
5e13087b
|
2019-01-04T22:01:14
|
|
Updated copyright for 2019
|
|
34237b80
|
2018-08-31T18:10:21
|
|
Better fix to make sure we're only returning controllers from the HIDAPI joystick API
|
|
16ccff3c
|
2018-08-29T20:23:36
|
|
Fixed whitespace
|
|
63107524
|
2018-08-15T19:53:34
|
|
Fixed input from the Steam Virtual Gamepad on Mac OS X
|
|
641c674f
|
2018-08-15T19:53:28
|
|
Turned off debug messages
|
|
51902010
|
2018-08-15T19:53:26
|
|
Remove the HIDAPI device if we get a read error from it
This fixes detecting PS4 controller disconnect on Mac OS X, where there isn't any device removed notification
|
|
31b02243
|
2018-08-09T16:04:45
|
|
Added notes that this code was contributed by Valve
|
|
d2042e1e
|
2018-08-09T16:00:17
|
|
Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms.
Added SDL_GameControllerRumble() and SDL_JoystickRumble() for simple force feedback outside of the SDL haptics API
|