src/joystick


Log

Author Commit Date CI Message
Sam Lantinga 29265d07 2022-08-07T18:49:30 Use SDL_GetStringBoolean() to parse the hint value
Sam Lantinga 198d62d8 2022-08-06T23:53:18 joystick: remove unused Xbox Controller Keyboard VID/PID. 0x045e, 0x0b02 - is actually virtual keyboard that is generated by XboxGip drivers for Xbox One Controllers. Closes https://github.com/libsdl-org/SDL/pull/5121
Sam Lantinga 52bf5b1d 2022-08-06T10:34:19 Added the hint SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED to control whether the player LED is set on Nintendo Switch controllers
Sam Lantinga f810dede 2022-08-06T09:50:13 Fixed comment so script processing works correctly
Francisco Javier Trujillo Mata 3da131c1 2022-08-05T21:07:54 Check if port if closed and open it again
Sam Lantinga d6a8b43c 2022-08-05T10:37:38 Added support for the HORIPAD FPS for Nintendo Switch
Sam Lantinga 4a9ceb7b 2022-08-04T11:33:36 The HORIPAD S uses the Xbox 360 protocol on all platforms and shows up as multiple styles of controller, depending on what model you have.
Sam Lantinga 28c01955 2022-08-04T10:46:37 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.
Sam Lantinga 40b71431 2022-08-04T10:24:03 Fixed button mapping for the HORIPAD S controller This controller looks like a GameCube controller, is actually a Nintendo Switch controller, and shows up as an XInput device on Windows with the buttons already in the correct location.
Sam Lantinga 43b90484 2022-08-04T00:40:38 Retry a little longer when writing to the Nintendo Joy-Con Charging Grip
Sam Lantinga dfd2c574 2022-08-03T22:27:43 Removed unused variable
Sam Lantinga a2b4f440 2022-08-03T22:27:42 The Nintendo Wii Remote Pro Controller respects the SDL_GAMECONTROLLER_USE_BUTTON_LABELS hint
Sam Lantinga c84dea09 2022-08-03T22:12:21 Fixed detecting the controller type of controllers over USB
Sam Lantinga ba297f12 2022-08-03T21:46:01 Use the Nintendo controller type to determine whether to always use button labels
Sam Lantinga 946f4777 2022-08-03T21:33:38 Don't set Bluetooth controllers to wired power level
Sam Lantinga 57c3b2c9 2022-08-03T21:31:12 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.
Sam Lantinga b6aadb16 2022-08-03T20:38:33 Added k_eSwitchDeviceInfoControllerType_N64 to ESwitchDeviceInfoControllerType
Sam Lantinga bdfb32de 2022-08-03T20:30:58 Added some additional Nintendo controller types to ESwitchDeviceInfoControllerType
Sam Lantinga ea7fbf79 2022-08-03T19:39:37 Update in-flight SDL_CONTROLLERDEVICEADDED messages when a device is removed This fixes the application trying to open the wrong device index when a device is removed and another has just been added
Sam Lantinga 5d50fa52 2022-08-03T19:39:36 Fixed timeout opening the Nintendo Joy-Con Charging Grip Sometimes opening the right Joy-Con takes a little longer for some reason
Sam Lantinga 29cdb2c9 2022-08-03T18:01:10 Added support for the Nintendo Switch Joy-Con Charging Grip
Sam Lantinga a8120104 2022-08-03T13:53:49 The Nintendo Online classic controllers and Joy-Cons shouldn't show up as Switch Pro controllers
Sam Lantinga 6e1ee1d4 2022-08-03T13:51:25 sort the controller names
Sam Lantinga 8ab9dc8b 2022-08-03T13:18:00 Fixed crash if Joy-Cons are disabled while a combined Joy-Cons controller is open
Sam Lantinga bcdef4aa 2022-08-03T13:07:47 Added separate hints for Nintendo Online classic controllers and Joy-Cons This allows them to be enabled/disabled separately from Switch Pro HIDAPI support
Mathieu Eyraud 59a104b8 2022-08-02T15:00:55 Do not pass NULL to memcpy ReadJoyConControllerType calls WriteSubcommandSync with pbuf=NULL
Mathieu Eyraud 42b23207 2022-08-02T14:42:25 Fix memory leak of children for combined JoyCon
Sam Lantinga 12aa4d56 2022-08-01T11:11:25 Added header needed for SDL_Delay()
Sam Lantinga aeb27514 2022-08-01T10:38:31 Poll DirectInput devices to get their initial state Fixes https://github.com/libsdl-org/SDL/issues/3816
Sam Lantinga 13e0c40e 2022-07-29T17:28:36 Added mapping for the 8BitDo Pro 2 controller in DirectInput mode over Bluetooth on Linux
Sam Lantinga 62c83166 2022-07-29T17:14:55 Added mapping for the 8BitDo Pro 2 controller in DirectInput mode
Sam Lantinga 41c363f7 2022-07-29T16:27:23 Note that the PDP Versus Fighting Pad is an arcade fighting pad
Sam Lantinga f3c1194c 2022-07-28T21:50:41 Removed obsolete comment
Sam Lantinga aee179e4 2022-07-28T21:50:20 Removed debug output
Sam Lantinga d8fd7873 2022-07-28T21:44:23 Added entry for the Nintendo Switch Joy-Con controller pair
Sam Lantinga 875b737c 2022-07-28T21:39:32 Added support for the Nintendo Online NES Controllers to the HIDAPI driver
Sam Lantinga ab967475 2022-07-28T19:38:38 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
Sam Lantinga dfed862a 2022-07-28T19:35:46 Fixed variable shadow warning
Sam Lantinga 2fa2f9ff 2022-07-28T19:22:27 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
Sam Lantinga def60ce6 2022-07-27T19:20:42 Fixed the name of the HIDAPI Joy-Con controller for consistency with other drivers
Sam Lantinga 0f1be940 2022-07-27T17:32:51 Updated mapping for Joy-Con controllers using hid-nintendo This matches the mapping on iOS 16 and will match the HIDAPI implementation.
Sam Lantinga 756978a2 2022-07-27T16:17:32 Left and right single Joy-Con controllers are mapped as individual mini controllers
Sam Lantinga 4990bd05 2022-07-27T16:17:32 Added debug code to show available inputs on iOS/tvOS controllers
Sam Lantinga a169259f 2022-07-27T09:05:02 Actually we don't need to unlock to send k_eSwitchProprietaryCommandIDs_ForceUSB since we don't wait for reply
Sam Lantinga c51464d9 2022-07-27T09:00:39 Put the Nintendo Switch Pro controller back into enhanced mode as needed Fixes https://github.com/libsdl-org/SDL/issues/3450
Sam Lantinga a423848e 2022-07-25T11:26:18 Allow floating point values for SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED This allows setting the brightness of the home LED on Nintendo Switch Pro controllers, in the range 0.0 - 1.0. This can be updated at runtime by setting the hint dynamically. Fixes https://github.com/libsdl-org/SDL/issues/3787
diddily 0ec5bb4e 2022-07-25T10:37:23 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.
Cameron Gutman 3ab1e303 2022-07-24T15:29:42 joystick: Refactor and fix a few bugs in Shield HIDAPI driver - CMD_CHARGE_STATE was checking the seqnum instead of the payload - Off-by-one error in size validation for command payload - Unused payload space was left uninitialized in output report
Sam Lantinga f9beef76 2022-07-22T18:58:29 Added support for the Nintendo Switch Joy-Con Controllers on iOS and tvOS 16
Sam Lantinga aad7ef6e 2022-07-22T10:58:34 Added support for the Nintendo Switch Pro Controller on iOS and tvOS 16
Sam Lantinga be3a945a 2022-07-20T11:05:55 Added support for the 8BitDo Ultimate Wired Controller for Xbox
Sam Lantinga cef1514b 2022-07-17T09:07:04 Fixed some Xcode warnings
Sam Lantinga 883409ea 2022-07-13T11:26:42 Added support for the misc1 button on the Nintendo Switch Pro Controller when using hid_nintendo kernel driver
SuperSamus 9a4f200d 2022-06-04T14:57:49 gamecontrollerdb: Linux, add mappings for hid-nintendo driver and more Taken from https://github.com/gabomdq/SDL_GameControllerDB/blob/master/gamecontrollerdb.txt
Sam Lantinga 06c7d226 2022-07-12T18:53:53 Added mappings for the HORI Fighting Stick mini 4 on Linux and macOS
Sam Lantinga e24b971a 2022-07-12T17:53:03 Added support for the NVIDIA Shield controller guide button
Cameron Gutman b321eae5 2022-07-11T19:43:25 joystick: Fix spurious battery empty events when opening a Shield controller
Cameron Gutman a0d8848b 2022-07-11T19:37:25 joystick: Plumb SDL_JoystickSendEffect() for the Shield HIDAPI driver The effect data format consists of one command byte followed by zero or more payload bytes.
Ozkan Sezer 4fa26533 2022-07-12T00:55:00 SDL_GetJoystickGUIDInfo: byte-swap vendor, product and version values. Reference issue: https://github.com/libsdl-org/SDL/issues/5907
Cameron Gutman 6e712d24 2022-07-09T22:55:36 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.
Cameron Gutman 3242265f 2022-07-10T12:22:47 joystick: Fix endianness issues in Xbox HIDAPI drivers
chalonverse f317d619 2022-07-01T13:59:14 Xbox GDKX support (#5869) * Xbox GDK support (14 squashed commits) * Added basic keyboard testing * Update readme * Code review fixes * Fixed issue where controller add/removal wasn't working (since the device notification events don't work on Xbox, have to use the joystick thread to poll XInput)
Cameron Gutman 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.
Jade Macho 6a2e6c82 2022-06-28T21:03:16 Add SDL_HINT_DIRECTINPUT_ENABLED (on by default)
Sourcery AI cddf095a 2022-06-27T05:00:43 'Refactored by Sourcery'
Pierre Wendling 6c536afd 2022-06-27T15:43:17 Fix C89 declaration for macOS modules. Since Clang 14, `-Wdeclaration-after-statement` is enforced on every standard.
chalonverse 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
Francisco Javier Trujillo Mata 7fd46ec5 2022-06-18T17:40:53 Initial PS2_Joystick implementation
Francisco Javier Trujillo Mata 2b41f497 2021-11-18T01:09:45 Improve Joystick removing semaphores
Francisco Javier Trujillo Mata c3a5e4aa 2022-06-22T00:54:03 Adding GetGamepadMapping to Vita Joystick driver
Sam Lantinga eb7e29a8 2022-06-17T17:43:14 Fixed crash when the joystick product name isn't available
Sam Lantinga b0e827fb 2022-06-17T07:55:33 Enable improved rumble emulation on DualSense(tm) Wireless Controllers with firmware version 2.24 and newer
Sam Lantinga 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
Sam Lantinga 017e2370 2022-06-15T17:32:46 Removed the Qanba Obsidian Arcade Joystick from the unknown controller list
Sam Lantinga a9cf313e 2022-06-15T17:28:29 Added the Qanba Obsidian and Dragon Arcade Sticks to the arcade stick list
Sam Lantinga bfe81a0c 2022-06-15T17:28:20 Added the name of the Qanba Obsidian Arcade Joystick in PC mode
Sam Lantinga a6a2cdbd 2022-06-15T17:28:18 Added the name of the Qanba Dragon Arcade Joystick in PC mode
Sam Lantinga a5d338bd 2022-06-15T14:11:00 Added support for the Qanba Dragon Arcade Joystick (PS3) on macOS
Sam Lantinga 7d7c4830 2022-06-15T14:10:22 Use python3 for sort_controllers.py
Sam Lantinga 72fea0ed 2022-06-15T13:58:28 Added support for the Qanba Dragon Arcade Joystick
Ozkan Sezer 714502d3 2022-06-13T22:15:56 minor windows warning fixes.
Sam Lantinga 68544be4 2022-06-10T11:31:59 Added support for the Nintendo Online controllers
Sam Lantinga 9202df04 2022-06-09T18:11:34 Implemented SDL_GameControllerGetFirmwareVersion() for HIDAPI PS5 controllers
Sam Lantinga c7f41038 2022-06-09T13:47:29 Special case for k_eControllerType_XInputSwitchController in the raw input path
Sam Lantinga e6cb0822 2022-06-09T13:20:38 Fixed the default mapping on Windows for the HORI Fighting Commander
Sam Lantinga d58d637a 2022-06-08T11:07:36 Added support for the Qanba Obsidian Arcade Joystick on Linux
Christoph Reichenbach 3a20274d 2022-06-04T20:16:28 Refactoring: move GUID operations out of Joystick - SDL_JoystickGUID -> SDL_GUID (though we retain a type alias) - Operations for GUID <-> String ops are now in src/SDL_guid.c and include/SDL_guid.h - The corresponding Joystick operations delegate to SDL_guid.c - Added test/testguid.c
Sam Lantinga 423141bf 2022-06-03T18:49:41 Added a function to get the controller firmware version
Sam Lantinga 17410887 2022-06-03T15:02:31 Separated controller type data into a C file
Sam Lantinga 7fa46ec4 2022-05-31T11:11:19 The Google Pixel fingerprint sensor also shows up on Linux when running on the phone
Sam Lantinga d2c4d74d 2022-05-27T15:49:35 Fixed build with MinGW-64 windows.devices.power.h The MinGW-64 header defines the parameters as ABI::Windows::Foundation::IReference<INT32 > **, but the Windows header defines the parameters as __FIReference_1_int**
Sam Lantinga bd22ca76 2022-05-27T15:40:50 Revert "Workaround for compiling with MinGW-w64" This reverts commit efdf43aa9b4f4d623ffba01f503d9793d5021330. The broken mingw headers aren't in an official release yet, so reporting this upstream.
Sam Lantinga efdf43aa 2022-05-27T15:34:45 Workaround for compiling with MinGW-w64 Fixes bug https://github.com/libsdl-org/SDL/issues/5589
Sam Lantinga b28d304b 2022-05-24T17:24:03 Only include controller_type.h in SDL_joystick.c It has a huge array of controllers and we only want it instantiated once
Sam Lantinga b1cf3229 2022-05-19T16:49:47 Fixed HIDAPI PS4 controller being picked up when running under Steam Input with PS4 configuration enabled
Sam Lantinga 47f1cb55 2022-05-18T23:48:15 Fixed picking up the correct mapping for virtual controllers on Android Fixes https://github.com/libsdl-org/SDL/issues/5662
Sam Lantinga f7b774a7 2022-05-18T17:59:17 Fixed build error on Linux if HAVE_INOTIFY isn't defined Fixes https://github.com/libsdl-org/SDL/issues/5682
Cameron Cawley 0cca71a8 2022-05-18T22:12:05 Use SDLCALL for callbacks in public APIs
Sam Lantinga 1f2a2416 2022-05-16T09:02:35 Add new virtual joysticks to the end of the list This guarantees that the device index that's returned is stable, as long as no joystick hotplug events occur.
Sam Lantinga 3c3ccb1d 2022-05-16T08:55:54 Fixed crash if a virtual joystick was disconnected