|
3e114872
|
2022-06-30T20:36:45
|
|
joystick: Fix redetection of HIDAPI joysticks after reinitializing
The HIDAPI joystick driver doesn't properly reset the change counter
it uses to track if re-enumeration is needed when the joystick
subsystem is quit and then reinitialized.
The first SDL_Init(SDL_INIT_JOYSTICK) will result in the expected
HIDAPI joysticks appearing, but subsequent calls will result in no
joysticks being enumerated until another HIDAPI joystick is added
or removed from the system.
|
|
3b191580
|
2022-06-27T17:19:39
|
|
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
|
|
b0e827fb
|
2022-06-17T07:55:33
|
|
Enable improved rumble emulation on DualSense(tm) Wireless Controllers with firmware version 2.24 and newer
|
|
16f55fbd
|
2022-06-15T20:44:43
|
|
Separate the controller protocol from the controller style
This allows us to handle controllers that use the Xbox protocol but look like Nintendo Switch or Playstation controllers, like the Qanba Dragon Arcade Stick in PC mode
|
|
68544be4
|
2022-06-10T11:31:59
|
|
Added support for the Nintendo Online controllers
|
|
9202df04
|
2022-06-09T18:11:34
|
|
Implemented SDL_GameControllerGetFirmwareVersion() for HIDAPI PS5 controllers
|
|
b1cf3229
|
2022-05-19T16:49:47
|
|
Fixed HIDAPI PS4 controller being picked up when running under Steam
Input with PS4 configuration enabled
|
|
0cca71a8
|
2022-05-18T22:12:05
|
|
Use SDLCALL for callbacks in public APIs
|
|
e551384a
|
2022-04-26T14:54:14
|
|
Added functions to get the platform dependent name for a joystick or game controller
|
|
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.
|
|
2ca08378
|
2022-04-22T14:21:41
|
|
SDL: sometimes the PS5 controller doesn't report having to power even when connected over USB. Possibly related to being completely charged? Either way we already know that it's USB or BT so let's use the driver's knowledge instead.
|
|
2c04df8d
|
2022-03-30T18:33:38
|
|
joystick: Fix rumble issues on PS5 HIDAPI controllers
We were returning the report size from HIDAPI_DriverPS5_RumbleJoystick() rather
than 0 upon success, causing SDL_JoystickRumble() (and callers) to think that
rumbling failed.
This didn't cause major problems until 1868c5b, when it started preventing
rumble state from being persisted in the joystick core, even though it was
successfully sent to the hardware.
This led to all sorts of strangeness, including broken rumble duration and
attempts to stop rumble being discarded.
|
|
4fe7b2cb
|
2022-03-24T11:00:43
|
|
static analysis: Fixed several complaints from codechecker.
There are still some pending Objective-C specific issues.
Reference issue #4600.
|
|
94d43186
|
2022-02-22T00:41:15
|
|
GameCubeAdapter: Add suppport for all rumble modes
This adds support for all 3 of the gamecube controller's rumble modes
Rumble: 1
Stop: 0
StopHard: 2
This is useful for applications that need the full range of support
This also adds a hint to control rumble behavior, defaults 0 to maintain compatibility
|
|
60deadba
|
2022-01-17T17:22:30
|
|
re-use return value of SDL_SetError/WIN_SetErrorFromHRESULT/SDL_OutOfMemory
|
|
b06866ef
|
2022-01-16T09:44:28
|
|
Entirely remove Xbox axis filtering, we don't want this at all.
|
|
09aed102
|
2022-01-16T09:23:58
|
|
Don't send output reports to the Victrix Pro FS v2
It'll hang on reboot if it gets output reports, and it doesn't have functionality that requires them, so skip it.
|
|
85961b61
|
2022-01-16T09:01:56
|
|
Disable Xbox axis deadzone handling by default
Fixes https://github.com/libsdl-org/SDL/issues/5227
|
|
1a50334c
|
2022-01-14T15:04:26
|
|
Fixed Xbox One trigger axis zero point
|
|
16f5b9e3
|
2022-01-05T11:07:52
|
|
Filter jitter on Xbox One controllers when using raw input reports
|
|
120c76c8
|
2022-01-03T09:40:00
|
|
Updated copyright for 2022
|
|
cb9f85e8
|
2021-11-22T11:18:01
|
|
Don't use "round", so that it's doesn't show up while searching for the function
|
|
d31251b0
|
2021-11-21T22:30:48
|
|
use SDL's functions version inplace of libc version
|
|
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.
|
|
6ad0fb84
|
2021-11-13T17:55:10
|
|
SDL_hidapi_ps4.c, SDL_hidapi_ps5.c: use SDL_zeroa()
|
|
a948ff84
|
2021-11-13T11:50:02
|
|
SDL_hidapijoystick.c: worked around a bogus 'unreachable code' warning.
|
|
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
|
|
b9b0df40
|
2021-11-11T12:52:31
|
|
Fixed Linux build
|
|
c9ada1c1
|
2021-11-11T12:45:38
|
|
Made HIDAPI device change notifications available via SDL_hid_device_change_count()
|
|
2a6feb50
|
2021-11-08T07:10:38
|
|
Removed accidental debugging commit (thanks @DomGries!)
|
|
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
|
|
c501d159
|
2021-10-03T14:10:21
|
|
Fixed range for Steam Controller sensor values
|
|
ea1a2b94
|
2021-10-02T09:12:57
|
|
Use the correct update rate for Steam Controller sensors
|
|
8b745752
|
2021-10-01T21:32:21
|
|
Added support for the gyro and accelerometer on Steam Controllers
Fixes https://github.com/libsdl-org/SDL/issues/4577
|
|
345c161f
|
2021-09-22T09:06:45
|
|
Fixed some accidental uses of external C runtime functions
|
|
7ed7644a
|
2021-09-07T17:37:47
|
|
Fixed compiling HIDAPI Steam Controller support with C89 compiler
|
|
503ea8e8
|
2021-08-25T14:41:58
|
|
Don't modify the Nintendo Switch home LED state by default
|
|
907943a2
|
2021-08-12T17:51:08
|
|
Added support for the Xbox One S Controller with 5.x series firmware
|
|
7aec0b90
|
2021-08-13T01:56:56
|
|
SDL_hidapi_xboxone.c: fix bogus 'uninitialized' warning from clang.
The last 'size == 50' check is always true anyway.
|
|
cec5a129
|
2021-08-12T15:49:33
|
|
Fixed libudev hotplug notifications in the HIDAPI driver
|
|
6eb4ebb5
|
2021-08-12T15:49:33
|
|
Simplified the HIDAPI Xbox One controller initialization
|
|
584b89ab
|
2021-08-12T08:17:10
|
|
Added support for the color LED on the Xbox Elite Series 2 controller
|
|
64882b24
|
2021-08-12T08:17:08
|
|
Added support for the Xbox One Elite 2 Controller with 5.x series firmware
|
|
dd683073
|
2021-08-06T15:13:14
|
|
hidapi: Patched to compile on QNX.
Fixes #4591.
|
|
9fdb0645
|
2021-08-04T11:33:28
|
|
Added support for the Joy-Con Charging Grip when SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS is enabled
|
|
6af6950d
|
2021-07-30T18:23:42
|
|
Added support for the Victrix Gambit Tournament Controller
|
|
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.
|
|
2a53f831
|
2021-07-26T23:29:20
|
|
Fixed controllers showing up under both MFI and HIDAPI drivers
The Game Controller Kit doesn't show the controllers at startup, so the HIDAPI driver sees them first and therefore gets preference when a controller is supported by both drivers.
This fixes bug https://github.com/libsdl-org/SDL/issues/4209
|
|
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.
|
|
94b7a876
|
2021-07-24T09:10:18
|
|
Added SDL_GameControllerType enumerations for the Amazon Luna and Google Stadia controllers
Fixes bug https://github.com/libsdl-org/SDL/issues/4019
|
|
e6e8fe6d
|
2021-07-23T10:45:03
|
|
hidapi_switch: Implement analog rumble
|
|
384d86b5
|
2021-07-23T23:48:23
|
|
Fixed compile warnings with Visual Studio
|
|
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
|
|
4a20dd3e
|
2021-07-08T07:38:18
|
|
Removed unnecessary comment, the mic button is in byte 16 on all firmware versions
|
|
430bbcb8
|
2021-07-07T09:49:33
|
|
Added HIDAPI support for the Amazon Luna Controller connected over USB in DirectInput mode
|
|
863f5669
|
2021-07-07T08:55:16
|
|
Fixed reading thumbstick axes and mic button on the Amazon Luna Controller firmware version 305164320
|
|
17ed8d80
|
2021-07-07T16:05:35
|
|
Added HIDAPI backend for Amazon Luna Controller Model T28B69 connected via Bluetooth LE (VID:0171, PID:0419).
To enter Bluetooth pairing mode hold B and Action (button with circle) buttons for 3 seconds.
It works via usual HIDAPI if special filter driver is not installed:
https://www.amazon.com/gp/help/customer/display.html?nodeId=GZCT4CTFHXLHEB9T
With that driver installed it mimics Xbox One controller and works via XInput under Windows.
Under DInput this controller is not usable at all.
|
|
afd100f0
|
2021-06-18T17:37:46
|
|
Added support for the PowerA Fusion Pro 2 and the PDP Xbox Series X Afterglow and Blue controllers
|
|
b81969d4
|
2021-05-17T14:50:33
|
|
Be more explicit about Xbox 360/One device ids.
When Xbox One/Series Controllers are connected via USB on Windows they all are using `XBOXGIP` driver and produce a special ProductID `0x02FF` (GIP software PID) for any connected controller.
On the other hand `Xbox 360 Wireless Controller Reciever` (PID 0x0719) is using `XUSB` driver and produces special ProductID `0x02A1` (XUSB software PID) for each connected Xbox 360 Wireless Controller.
Also fixed Xbox One Series X Controller comment.
|
|
3fcaf5b4
|
2021-05-25T10:33:30
|
|
Fixed incorrect axis scaling for Nintendo Switch controllers
|
|
333c8e75
|
2021-05-17T11:54:05
|
|
The PS5 driver supports Joystick LED
|
|
4535d654
|
2021-04-22T14:35:59
|
|
HIDAPI_UpdateDiscovery: only treat "add" and "remove" events as relevant
I have a buggy system which reports a udev "change" event for an empty
USB-C port every 0.14 seconds, which causes annoying frame hitches
because SDL decides that means it needs to do a libusb hid_enumerate,
which is slow (~25ms!) because of the get_usb_string() calls in there.
We only need to re-enumerate if we've seen a device added or removed, so
let's filter out the change event first.
Signed-off-by: Steven Noonan <steven@valvesoftware.com>
Signed-off-by: Sam Lantinga <slouken@libsdl.org>
|
|
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
|
|
7a2b6f33
|
2021-02-22T13:32:42
|
|
Guard Inotify stuff with macro
This fix implicit declaration of close and unused variable warning.
|
|
db58166e
|
2021-02-21T17:28:08
|
|
joystick: hidapi: Properly include <unistd.h> when inotify not available
In the extremely unlikely event that inotify is not available (and,
therefore, HAVE_INOTIFY is not #defined), SDL will no-longer build.
This is because <unistd.h> is only included when HAVE_INOTIFY is
defined, and PR #4098 adds a call to access(…, F_OK), which requires
<unistd.h>.
(Note that the F_OK symbol is the only one which actually prevented
SDL from compiling, but both access() and close() fell back to implicit
definitions, which is a bit concerning.)
Fixes: 8d43f45a7b ("Don't use udev for joystick enumeration if running in a container")
|
|
8d43f45a
|
2021-02-16T14:13:30
|
|
Don't use udev for joystick enumeration if running in a container
If we are running in a container, like Flatpak[1] or pressure-vessel[2],
it's likely that we are using user namespaces,
therefore udev event notification via netlink won't work reliably.
Use their filesystem API to detect them and automatically fallback to
the inotify-based enumeration.
[1] <https://flatpak.org/>
[2]
<https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/tree/master/pressure-vessel>
Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
|
|
2c326915
|
2021-02-16T12:39:48
|
|
Use inotify for HIDAPI joystick enumeration if not using udev
This improves SDL's ability to detect HIDAPI joystick hotplug in a
container environment because we cannot reliably receive events from
udev in a container.
For a more detailed explanation of why this issue happens with
containers, please check the previous commit
"joystick: Use inotify to detect joystick unplug if not using udev"
(b0eba1c5).
Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
|
|
b17242bf
|
2021-02-16T11:50:20
|
|
Allow libudev for HIDAPI joystick to be disabled at runtime
As already explained in the previous commit "joystick: Allow libudev to
be disabled at runtime" (13e7d1a9), libudev can fail in a container.
To make it easier to experiment with, we add a new environment variable
"SDL_HIDAPI_JOYSTICK_DISABLE_UDEV" that disables udev and let it
fallback to the device enumeration using polling.
Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
|
|
42607909
|
2021-02-20T22:51:57
|
|
Remove devices from the list after they've been disconnected due to read errors.
This fixes problems with controllers not being re-detected when a computer goes to sleep and a controller is removed and plugged back in while it's asleep.
|
|
5427f486
|
2021-02-11T17:28:07
|
|
Added support for trigger rumble for all Microsoft Xbox One controllers
|
|
dc45a228
|
2021-02-08T00:20:56
|
|
avoid some pedantic warnings in array initializers
|
|
9c3aa7f0
|
2021-02-06T15:43:17
|
|
SDL: fix packet handling for original version of Stadia FW
|
|
f4d58689
|
2021-02-03T18:00:22
|
|
Fix Xbox Series X controller on macOS
There were two different implementations of IsBluetoothXboxOneController(), one
in SDL_hidapi_xbox360.c and one in SDL_hidapi_xboxone.c. The latter had been
updated to include USB_PRODUCT_XBOX_ONE_SERIES_X_BLUETOOTH while the former had
not.
This mismatch led to the Xbox Series X failing on macOS only. We have special
code for handling the 360Controller driver for macOS which requires us to use
the Xbox 360 driver for wired Xbox One controllers, and the SDL_hidapi_xbox360
version of IsBluetoothXboxOneController() was used to determine which devices
were wired.
In addition to adding the missing USB_PRODUCT_XBOX_ONE_SERIES_X_BLUETOOTH, this
change moves IsBluetoothXboxOneController() into a single shared function which
will ensure this bug won't happen again.
|
|
85235985
|
2021-02-02T11:53:31
|
|
Fixed detecting the paddles on the Xbox Elite Series 1 controller
|
|
2cc70ca3
|
2021-01-29T13:04:01
|
|
Fixed crash if the GameCube controller hasn't been opened yet
|
|
7f710e93
|
2021-01-28T14:54:01
|
|
Make sure we don't create a game controller mapping for HID devices that aren't supported by HIDAPI
|
|
d81eaf8d
|
2021-01-27T12:43:35
|
|
Added explicit case from Uint8 to int before subtracting offset
|
|
bec9d740
|
2021-01-27T12:41:58
|
|
Fixed compile warning
|
|
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
|
|
1981d23f
|
2021-01-23T11:06:35
|
|
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:
https://github.com/chromium/chromium/blob/99314be8152e688bafbbf9a615536bdbb289ea87/device/gamepad/hid_haptic_gamepad.cc#L45
|
|
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.
|
|
f68b36df
|
2021-01-22T11:42:42
|
|
Added support for the EVORETRO GameCube Adapter in PC mode
|
|
9e45372a
|
2021-01-21T22:47:37
|
|
Fixed build on Android and iOS
|
|
3527b494
|
2021-01-21T22:30:34
|
|
Fixed initializing the Nyko and EVORETRO GameCube adaptors
This requires root on most Linux distributions, as we have to directly send USB messages to the devices to enable input reports.
|
|
6e97170e
|
2021-01-08T21:16:06
|
|
Use PS4 rumble hint as the default for the PS5 rumble hint
Existing SDL applications may not know about the need to set a specific
hint to enable rumble on PS5 controllers, even though they may already
set the equivalent SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE hint for PS4
controller rumble support.
Rather than requiring those developers update their apps, let's use the
SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE value as an indication of the behavior
they are expected for all PlayStation controllers.
|
|
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
|
|
d0b87fed
|
2021-01-14T23:49:27
|
|
Added HIDAPI rumble debug info
|