Ozkan Sezer
47d3e96b43
SDL_joystick.c: (unsigned char) cast to SDL_tolower() parameters.
2021-12-18 14:01:02 +03:00
Sam Lantinga
a6cbe0ab87
Controllers are always centered at zero using XInput and WGI
2021-11-27 10:58:12 -08:00
Sam Lantinga
d861820465
SDL_JoystickGetAttached() doesn't need to be noisy for NULL joystick
...
Fixes https://github.com/libsdl-org/SDL/issues/5008
2021-11-26 07:57:48 -08:00
Cameron Gutman
1237142be3
joystick: Quit drivers in reverse order to ensure dependencies are not broken
...
SDL_WINDOWS_JoystickDriver depends on callbacks in SDL_RAWINPUT_JoystickDriver
and SDL_HIDAPI_JoystickDriver being available. It also manages the common
WindowProc used for joystick detection in both WINDOWS and RAWINPUT drivers.
If we don't tear them down backwards, there's a window of time where we could
invoke RAWINPUT_WindowProc() after RAWINPUT_JoystickQuit() was called.
2021-11-19 08:19:30 -06:00
Cameron Gutman
fe09a4930a
joystick: Add APIs to query rumble support
2021-11-11 15:10:08 -08:00
Cameron Gutman
1ccfbf963e
joystick: Convert HasLED() into a generic GetCapabilities() function
2021-11-11 15:10:08 -08:00
Sam Lantinga
7681929cb4
Don't send the initial joystick axis event if the application is in the background
2021-11-09 12:30:37 -08:00
Sam Lantinga
d31f90d9e1
Don't send game controller touchpad or sensor events unless the application has focus
...
Fixes https://github.com/libsdl-org/SDL/issues/4891
2021-11-09 12:09:01 -08:00
Sam Lantinga
26706319d7
Ignore the ASRock LED controller, it's not a joystick
2021-10-30 05:53:12 -07:00
Sam Lantinga
a43d3f6931
Don't detect the ROG Chakram mouse as a joystick
2021-10-20 15:19:22 -07:00
Sam Lantinga
9706feacae
Update length after shortening string (thanks mayraud705!)
...
Closes https://github.com/libsdl-org/SDL/pull/4698
2021-10-01 15:11:25 -07:00
Sam Lantinga
441fbcaa3d
Added HIDAPI support for the Xbox Adaptive Controller
2021-08-13 20:48:54 -07:00
Sam Lantinga
907943a236
Added support for the Xbox One S Controller with 5.x series firmware
2021-08-12 17:51:08 -07:00
Sam Lantinga
64882b2466
Added support for the Xbox One Elite 2 Controller with 5.x series firmware
2021-08-12 08:17:08 -07: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
16010f7561
Added support for the PowerA Nintendo Switch Fusion Arcade Stick
2021-07-30 18:23:43 -07:00
Sam Lantinga
b33f470901
Fixed detection of the PDP Afterglow Wireless Switch Controller over Bluetooth
2021-07-30 18:23:42 -07:00
Sam Lantinga
6af6950dbc
Added support for the Victrix Gambit Tournament Controller
2021-07-30 18:23:42 -07:00
Sam Lantinga
243a8836af
The PowerA Nintendo Switch Fusion Pro Controller has a working USB mode, enabled via the switch on the underside of the controller.
2021-07-30 18:23:41 -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
10ec4c8671
Added support for the PowerA Nintendo Switch Spectra Controller
2021-07-24 22:11:22 -07:00
Sam Lantinga
94b7a87645
Added SDL_GameControllerType enumerations for the Amazon Luna and Google Stadia controllers
...
Fixes bug https://github.com/libsdl-org/SDL/issues/4019
2021-07-24 09:10:18 -07:00
Sam Lantinga
669714cafe
Added the ThrustMaster T.16000M as a flightstick
2021-07-23 23:51:35 -07:00
Sam Lantinga
422b053b96
Added support for the full line of current PowerA Xbox Series X controllers
2021-07-23 16:32:35 -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
24e836b0db
Added controller mapping for the Nimbus+ controller on macOS when MFi support is not available
2021-07-06 10:00:09 -07:00
Joshua Ashton
ca383599b5
Fix Anne Pro II keyboard showing up as a joystick
...
Having used this for a couple years, I can definitely confirm that it is not a joystick.
2021-06-26 21:23:26 -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
Sam Lantinga
d8dba5bcf3
Added support for the Logitech G923 racing wheel
2021-06-17 11:22:08 -07:00
Paul Cercueil
f3cf019ecb
joystick: Add missing comma in joystick drivers list
...
Without this comma it is impossible to enable both the Vita and Dummy
drivers at the same time.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2021-06-12 15:50:02 +03:00
Timo Gurr
b63cb822bf
Added T500RS to known wheel list
2021-06-01 09:54:58 -07:00
Kimplul
9e1d7baef1
Added T300RS to known wheel list
2021-05-12 09:25:57 -07:00
Sam Lantinga
2a20cc0f1d
SDL: let through a SetLED command every 5sec to deall with situations where the controller loses power when a computer is suspended
...
CR: SamL
2021-04-12 11:25:42 -07:00
Sam Lantinga
3377861ab1
Added support for the Amazon Game Controller to the HIDAPI driver
2021-03-26 11:57:19 -07:00
Ivan Epifanov
73b545ed28
Fix joystick support
2021-03-08 09:07:12 -08:00
Sam Lantinga
1f7ec3fa4e
Added support for the PowerA Xbox One Series X Wired Controller
2021-02-11 17:27:22 -08:00
Cameron Gutman
f4d58689e0
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.
2021-02-10 10:22:19 -05: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
7e19c634c1
Note that the Logitech G29 (PS4) is a racing wheel
2021-02-10 10:22:18 -05:00
JibbSmart
0f57864c9e
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.
2021-01-24 00:51:25 -05:00
Ozkan Sezer
fd65aaa9a8
move outdated winmm and psp joystick codes to struct _SDL_JoystickDriver
...
build-tested only. (bug #5472.)
2021-01-24 00:51:25 -05:00
Ozkan Sezer
4a776557af
old os2 analogue joystick code ported from SDL-1.2. disabled by default,
...
build-tested only.
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
b2a0c712cb
Allow setting the player index to -1, which turns off the player LED for PS5 controllers
2021-01-04 12:24:44 -08:00
Sam Lantinga
9130f7c377
Updated copyright for 2021
2021-01-02 10:25:38 -08:00
Sam Lantinga
cb36189692
Fixed bug 5235 - All internal sources should include SDL_assert.h
...
Ryan C. Gordon
We should really stick this in SDL_internal.h or something so it's always available.
2020-12-09 07:16:22 -08:00
Cameron Gutman
9d40a0f317
Fix joystick device add events containing invalid device indexes
...
This can happen if the application has not yet processed SDL_JOYDEVICEADD when
the same joystick is removed. It may also happen if two joysticks are added
and the second joystick is removed before the first joystick's SDL_JOYDEVICEADD
has been processed by the application.
2020-08-29 16:50:26 -07:00
Sam Lantinga
3c07dd12f0
Strip an extra '.' off of the HORI manufacturer name
2020-11-25 10:28:48 -08:00
Sam Lantinga
9fc4a4c92c
Revamped Xbox One HIDAPI init sequence
...
Added support for querying the controller serial number on newer firmware
2020-11-24 22:25:26 -08:00
Sam Lantinga
feab9d42c1
5363 - Memory leak of joystick->sensors in SDL_JoystickClose
...
Mathieu Eyraud
Joystick->sensors is never freed.
2020-11-24 06:40:13 -08:00