src/joystick


Log

Author Commit Date CI Message
Sam Lantinga 0bc852ce 2022-10-17T17:43:06 Revert "Disable the RAWINPUT joystick driver by default" Disabling RAWINPUT on Windows 10 causes these issues: * All Xbox controllers are named "XInput Controller". * Trigger rumble no longer works. * "XInput Controllers" are now also listed as separate haptic devices
Sam Lantinga 333935ff 2022-10-17T11:10:53 Make sure we completely unlock joysticks when opening HIDAPI devices Also lock the joysticks when adding and removing Android joysticks
Sam Lantinga 47ba997f 2022-10-17T07:39:52 Disable the RAWINPUT joystick driver by default It's only needed to support more than 4 Xbox controllers, and adds significant complexity to the joystick processing, and we regularly get bugs from people who aren't using an SDL window who need to turn on SDL_HINT_JOYSTICK_THREAD.
Sam Lantinga 5025f240 2022-10-17T07:32:44 Don't use RAWINPUT joystick driver on Windows XP Fixes https://github.com/libsdl-org/SDL/issues/6400
Sam Lantinga 70dfd6dd 2022-10-16T09:05:13 Added mapping for Xbox Series X controller Fixes https://github.com/libsdl-org/SDL/issues/6296
Sam Lantinga e8fdb861 2022-10-15T10:02:39 Removed redundant masking when loading the IMU calibration
happyharryh a6573f94 2022-10-16T00:23:25 Fix bugs in IMU calibration loading for Nintendo Controllers
Sam Lantinga 5129a077 2022-10-14T14:35:52 Steam Controller support defaults off, as documented in SDL_hints.h
Sam Lantinga 6af17369 2022-10-14T10:36:24 Added mapping for Qanba Drone on Linux without HIDAPI
Sam Lantinga 93b71967 2022-10-14T10:32:03 Only update the battery level if we're on Bluetooth Fixes battery level dropping to empty with the Qanba Drone Arcade Stick. It looks like we might also be able to skip the check for all third party controllers, but I think this is the right thing to do for Sony controllers as well.
Sam Lantinga 120a957d 2022-10-14T09:57:02 Added support for the Qanba Drone Arcade Stick
Sam Lantinga fc73386f 2022-10-12T21:44:50 Fixed the mapping from raw joystick values to the expected [SDL_JOYSTICK_AXIS_MIN, SDL_JOYSTICK_AXIS_MAX] range. (thanks Tas!) The original code mapped incorrectly from [min, max] to [-32768, 32512], the upper bound being SDL_JOYSTICK_AXIS_MAX - 255 instead of SDL_JOYSTICK_AXIS_MAX.
happyharryh 6f224e4d 2022-10-11T10:44:20 Made timestamp_us of sensor events increase monotonically for Nintendo controllers
Pierre Wendling 43a2b0b1 2022-10-10T00:00:52 N3DS: Use macro to correct axis. Using `(value * SDL max) / 3DS max` allows for marginally better accuracy compared to `value * (SDL max / 3DS max)`.
Pierre Wendling cb1972b3 2022-09-20T23:07:04 N3DS: ZL and ZR should be considered as triggers. Previously they were considered as clicking stick.
Pierre Wendling 86a8714f 2022-09-20T23:04:20 N3DS: Refactor joystick module to avoid globals.
Pierre Wendling 392f3882 2022-09-20T22:45:24 N3DS: Use SDL_Sensor instead of Joystick sensors.
Pierre Wendling 266014fa 2022-09-18T13:38:26 N3DS: Use SDL_Touch instead of the Joystick touch.
Pierre Wendling 03bbbcd8 2022-09-18T09:06:36 N3DS: Use CreateJoystickGUIDForName.
Pierre Wendling 65527537 2021-03-30T04:32:39 N3DS port (squashed) A dedicated renderer using Citro3D would likely allow for better much better graphical performances.
Sam Lantinga efdb390c 2022-10-09T09:11:33 Disable the HIDAPI Wii driver by default as it doesn't work with the dolphinbar
Sam Lantinga 33050fea 2022-10-07T11:29:49 Only open HID devices that might have a HIDAPI driver available This prevents an OS prompt for every connected device when running on Android
Sam Lantinga fc720321 2022-10-06T18:23:07 Fix rare deadlock when opening a HID controller on Android Fixes https://github.com/libsdl-org/SDL/issues/6347
Sam Lantinga 689409fd 2022-10-06T17:34:24 Fixed the start button on the Nimbus+ controller on tvOS Also updated mappings for Nintendo Switch controllers on tvOS, to reflect the lack of guide/menu button availability
Sam Lantinga ddc3de60 2022-10-05T16:24:05 Added mapping for PS5 controller over Bluetooth on Android 12 Tested on Pixel 3a
Sam Lantinga 81afb3e3 2022-10-05T16:18:09 Need to swap endianness when extracting the CRC from game controller mappings
Sam Lantinga 3607f831 2022-10-03T11:00:50 Find out if a controller is wireless using WGI (thanks @DJm00n!) Confirmed using an Xbox Series X controller over USB and Bluetooth Fixes https://github.com/libsdl-org/SDL/issues/6322
Sam Lantinga bd6afc23 2022-10-02T10:15:39 Fixed sensor axes in vertical mode
Sam Lantinga b4c25f57 2022-10-02T09:51:05 Remapped the side button and trigger as paddles for the mini-gamepad mode of the Joy-Cons This is the only case where the mapping differs between right and left Joy-Cons in mini-gamepad mode. The left Joy-Con will have the left paddles and the right Joy-Con will have the right paddles. This facilitates co-op gameplay with individual actions while still using the normal mini-gamepad mode. The paddles are used for this because conceptually they are more awkward to hit than the normal controls and they are in roughly the correct hand position.
Sam Lantinga f58a6506 2022-10-02T09:50:27 Added paddle mapping for combined Joy-Cons
Sam Lantinga 37dfa262 2022-10-02T09:36:50 Added paddle mapping for combined Joy-Cons
Happy Harry 6c8bf3af 2022-10-03T00:19:34 Add vertical mode for Nintendo Joy-Con (#6303) * Added support for vertical mode for Joy-Con controllers * Added the hint SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS for switching to this mode * Added support for SL/SR buttons in combined/vertical mode and L/ZL/R/ZR buttons in mini-gamepad mode
Sam Lantinga 0672dc8d 2022-10-02T08:48:38 Fixed combined Joy-Cons after https://github.com/libsdl-org/SDL/commit/aa2e2f4843567cfe4e6f2f4ffa3f0b74dd98f1ba (thanks @happyharryh!)
Sam Lantinga 7becbd7d 2022-09-27T12:58:16 Add joystick locking for controller notifications on iOS/tvOS Fixes https://github.com/libsdl-org/SDL/issues/6288
Sam Lantinga 18eb319a 2022-09-27T12:34:03 Added sensor timestamp for Nintendo Switch controllers
Sam Lantinga 5e3a4030 2022-09-27T11:36:01 Added sensor timestamp for Steam Controllers
Sam Lantinga 2c518747 2022-09-27T09:56:02 Added microsecond timestamp to sensor values for PS4 and PS5 controllers using the HIDAPI driver
Sam Lantinga 1e1be0b9 2022-09-26T23:00:58 Updated logic to match between PS4/PS5/Switch controllers
Sam Lantinga 8c40a6b0 2022-09-26T22:47:21 Drop PS5 Bluetooth reports that fail CRC check
Sam Lantinga db075ff3 2022-09-26T22:45:01 Removed unused variable
Sam Lantinga 2ccdd066 2022-09-26T22:32:57 Handle DS4 dongle controller connection and disconnection We also drop Bluetooth packets that fail the CRC check, as recommended by Sony
Sam Lantinga 18046b9a 2022-09-26T20:53:50 Fixed crash with a NULL serial number
Sam Lantinga 67fa6a93 2022-09-26T20:49:26 Don't wait a long time for zombie Bluetooth controllers If a Nintendo Switch Pro controller is turned off, it will leave the controller connected in Windows, but not responding to reports. Don't wait a really long time trying to get information from a controller in this state.
Sam Lantinga 67db8a91 2022-09-26T20:41:51 Wait for input before reconnecting a Bluetooth device On Windows, the Bluetooth device can remain in a connected state if the controller just shut down. It won't return any errors, but it also won't generate any input reports in this state, so wait until we know for sure that the Bluetooth controller is sending data before letting the application know it's available.
Sam Lantinga 2cc91761 2022-09-26T18:52:26 Removed debug logging
Sam Lantinga 2c98c8af 2022-09-26T18:39:18 Use better default values for Switch controller calibration
Sam Lantinga a205c5e2 2022-09-26T18:18:16 Use separate extents for simple and advanced reports
Sam Lantinga b7fddb4c 2022-09-26T14:39:51 Minor tweaks
Sam Lantinga 39adcc0a 2022-09-26T14:20:34 Prefer USB input over Bluetooth for PS5/PS5/Switch controllers Nintendo Switch controllers will automatically turn off Bluetooth when connected over USB, but this takes care of that a little more quickly. PS4 and PS5 controllers will happily send reports over both Bluetooth and USB, so we'll prefer USB if connected and switch back to Bluetooth if USB is disconnected.
Sam Lantinga 17d7d03a 2022-09-26T08:12:35 Added detection of the joystick type for third party PS4 and PS5 controllers
Sam Lantinga 8d2cb155 2022-09-23T16:56:24 Added an entry for the ZEROPLUS P4 Wired Gamepad
Sam Lantinga cb063db6 2022-09-23T16:52:37 Moved XInputPS4 controllers into the PS4 controller section
Sam Lantinga 5b3b7e6e 2022-09-23T16:46:36 Separated PS4/PS5 effects support into individual capabilities
Sam Lantinga 33619aa2 2022-09-23T16:38:15 Added support for the ZEROPLUS P4 Wired Gamepad to the HIDAPI driver
Sam Lantinga e888c99f 2022-09-23T16:26:41 Fixed the entry for the Nacon PS4 Compact Controller
Sam Lantinga 4ea64fee 2022-09-23T15:28:32 Fixed manufacturer/product name deduplication for the Razer Raiju Tournament Edition controller
Sam Lantinga 56b91ea7 2022-09-23T15:27:40 Fixed feature detection for the Razer Raiju Tournament Edition controller
Sam Lantinga 34f928ab 2022-09-23T09:26:18 Generate the correct name for ASTRO Gaming controllers Manufacturer "ASTRO Gaming" and product "ASTRO C40" turns into "ASTRO C40"
Sam Lantinga 6ddef7c2 2022-09-23T09:20:27 Generate the correct name for Qanba and Mad Catz controllers
Sam Lantinga c2ae2ccc 2022-09-23T09:10:51 Added feature support for the Razer Raiju to the HIDAPI driver
Sam Lantinga 51fefd1c 2022-09-23T02:39:35 Added support for third party PS3 controllers to the HIDAPI driver
Sam Lantinga 5b4c10fc 2022-09-23T02:36:53 Return true from IsSupportedDevice if it's a device that we _might_ support This forces an update of the device list so we have the correct state when we check to see whether a device is being handled by HIDAPI
Sam Lantinga 1d34a524 2022-09-23T00:38:23 Fixed shadowed variable warning
Sam Lantinga 010d3e64 2022-09-23T00:36:46 Fixed function prototype mismatch
Sam Lantinga b7940c29 2022-09-23T00:15:40 Allow HIDAPI controllers to override the default joystick type
Sam Lantinga 899a1e7c 2022-09-22T23:54:26 Skip PS4/PS5 probe message if we already know it's a supported controller
Sam Lantinga fa2063fb 2022-09-22T23:42:25 Improved detection of third party PS4 and PS5 controllers
Sam Lantinga aa2e2f48 2022-09-22T18:22:17 Make sure HID devices can be opened before making them available to the application This prevents a number of issues where devices are enumerated but not actually able to be opened, like https://github.com/libsdl-org/SDL/issues/5781. We currently leave the devices open, allowing us to more easily do controller feature detection, protocol negotiation, detect dropped Bluetooth connections, etc. with the expectation that the application is likely to open the controllers shortly.
Sam Lantinga 2857e3c7 2022-09-22T15:53:32 Added an entry for the Mad Catz FightStick TE 2+ PS3
Sam Lantinga 6812f1b5 2022-09-22T15:16:34 Fixed the entry for the HORI Fighting Commander 4 in PS4 mode
Sam Lantinga 6cbdc666 2022-09-22T09:05:06 Fixed use of uninitialized 'size' variable (thanks @ozkan!)
Sam Lantinga 0c4594ac 2022-09-22T06:45:46 Improved PS4 and PS5 third-party controller feature detection
Ivan Epifanov 08a33184 2022-09-18T21:40:15 Vita: fix controls on PSTV with opened IME
Sam Lantinga 2e9f5b59 2022-09-16T15:41:35 Added support for the HORI Fighting Commander OCTA (Xbox Series X and PS versions)
Sam Lantinga 5892ed43 2022-09-16T09:44:39 Fixed Xcode warnings on macOS
Sam Lantinga eb046958 2022-09-16T08:19:45 Fixed build warning
Sam Lantinga 4f1b408a 2022-09-12T18:19:02 Fixed button mapping for PS5 controllers
Amir 7f415ce5 2022-09-12T20:09:00 android: fix some compiler warnings
Sam Lantinga a3900a75 2022-09-08T13:59:25 Lock joysticks when removing a controller on the WGI thread
Sam Lantinga 12413ab3 2022-09-08T13:33:04 Lock joysticks while attaching a virtual one
Ozkan Sezer 787cd580 2022-09-08T23:00:04 silence unused function warning for SDL_endswith() on non-linux.
Sam Lantinga 40715732 2022-09-08T11:50:56 Don't try to second guess DS4Windows, let it remap things as expected. DS4Windows can create both emulated Xbox and emulated PS4 controllers, and we don't know which the user has it doing, so don't try to second guess it, just let it do it's thing. Users should follow the remapping software recommendations on when to enable/disable it for various situations. Fixes https://github.com/libsdl-org/SDL/issues/6167
Sam Lantinga a0f16960 2022-09-08T09:53:24 Fixed the CRC in the mappings for PS2, PSP, and Vita controllers
Sam Lantinga 0ad8d9d2 2022-09-07T15:31:24 SDL_IsXInputDevice() shouldn't return true if XInput isn't enabled
Sam Lantinga d93f9a77 2022-09-07T12:33:43 The new Wii Remote shares the same VID/PID as the Wii U Pro controller
Sam Lantinga f398d8a4 2022-09-07T11:53:13 Note that the Logitech Extreme 3D is a flight stick
Sam Lantinga 0a05b281 2022-09-07T11:51:16 Make sure we hold the joystick lock when updating the device state while opening it
Sam Lantinga d4e0d27c 2022-09-07T02:02:04 Added Wii Remote controller mappings for Linux
Sam Lantinga 42cf6d6c 2022-09-07T01:41:11 Don't treat the Wii extension controls as a separate game controller on Linux
Sam Lantinga 87f8b6ff 2022-09-07T01:21:01 Don't mess with the state of the Motion Plus extension on Linux
Sam Lantinga c28da489 2022-09-07T00:52:40 Fixed build
Sam Lantinga 638452ec 2022-09-07T00:44:13 Assert that continuous reporting is enabled, so input timeout is a reliable way of detecting Bluetooth connection problems.
Sam Lantinga 8dfe0e4b 2022-09-07T00:41:29 Removed checks not needed for the Wii U Pro Controller
Sam Lantinga 4018f35e 2022-09-07T00:00:27 Added left and right sensors for Nintendo Joy-Con and Wii controllers
Sam Lantinga 30f55a5d 2022-09-06T23:33:55 Added initial support for the Wii Motion Plus extension This adds a gyro sensor to the Wii controller, and is enabled in standalone and nunchuk mode
Sam Lantinga d1fea10c 2022-09-05T16:08:15 Added support for the accelerometer in the Wii Remote
Sam Lantinga a61b823d 2022-09-05T14:31:25 Added support for the Wii Remote with the Classic Controller Pro extension Also changed event order to: buttons, triggers, axes, for consistency with other drivers
Ozkan Sezer 612a86eb 2022-09-05T20:47:00 HIDAPI_DriverPS3_UpdateEffects: kill bad use of & operator on effects[]
Sam Lantinga b00e1b1b 2022-09-05T10:01:28 Added support for a ShanWan PS2 -> PS3 USB converter to the HIDAPI driver
Sam Lantinga 1b4e08b8 2022-09-02T17:04:30 Added an entry for the Hori Fighting Stick mini 4 kai This is a PS3/PS4 arcade stick which becomes an Xbox 360 controller on PC