src/joystick


Log

Author Commit Date CI Message
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
Sam Lantinga 48b6cd8b 2022-05-16T07:23:30 Fixed whitespace
Sam Lantinga f0bc5c9c 2022-05-16T07:21:28 Added effects support for virtual controllers
Sam Lantinga b3a18706 2022-05-16T06:37:38 Removed unused variables
Sam Lantinga 7e005bd8 2022-05-16T06:22:18 Fixed mapping the paddle buttons with the virtual controller
Sam Lantinga bfac54b5 2022-05-15T20:33:28 Added the ability to specify which buttons and axes are present for virtual controllers
Sam Lantinga 94eeb587 2022-05-15T20:01:12 First pass at extending virtual controller functionality Added the ability to specify a name and the product VID/PID for a virtual controller Also added a test case to testgamecontroller, if you pass --virtual as a parameter
Sam Lantinga 7ad15c5b 2022-05-15T09:35:52 Added game controller support for virtual joysticks Fixes https://github.com/libsdl-org/SDL/issues/5662
Sam Lantinga a3c1ca1f 2022-05-06T09:07:36 Added support for the Backbone One guide button The guide button is activated on a long press (> 400ms)
Ozkan Sezer 3f813cf1 2022-05-04T10:05:56 SDL_rawinputjoystick.c: fixed -Werror=declaration-after-statement
atfrase db9e14e5 2022-01-31T13:55:37 disabled linux joystick debugging outputs and reverted unnecessary comment edit
atfrase 3b53555b 2022-01-28T14:53:28 copied default Steam Controller mapping for wired and wireless-dongle USB pids
atfrase 13b1bf4f 2022-01-28T13:31:08 added default gamepad mapping for Steam Controller with new GUID (possibly caused by the firmware update to enable BLE?)
atfrase f7a19f9e 2022-01-14T13:14:42 relaxed the digital hat deadzone slightly, and fixed typo in DEBUG_GAMEPAD_MAPPING define
atfrase 3696e23d 2022-01-14T10:45:16 added hints SDL_HINT_LINUX_DIGITAL_HATS and SDL_HINT_LINUX_HAT_DEADZONES to control the new Linux hat handling; added define DEBUG_GAMEPAD_MAPPINGS to log messages when generating default gamepad mapings for Linux joysticks
atfrase 0b8e796e 2022-01-12T22:00:46 added hueristic to differentiate digital vs analog 'hat' input axes and expose the latter as regular axes; added automatic deadzones to hat outputs, in case analog axes are still mapped to digital hats; updated automatic gamepad control mapping to more completely follow the spec
Daniel Brookman d1a3981b 2022-05-02T15:22:46 Fix crash when reading background events for MFi controllers on macOS Enabling GCController.shouldMonitorBackgroundEvents to read background events for MFi controllers before receiving the first GCControllerDidConnectNotification is apparently a no-go on macOS (12.3.1 for me), and would crash on attempt. Apple's documentation is... not great, and doesn't point this out. This waits for IOS_AddMFIJoystickDevice() to get called down the chain from GCControllerDidConnectNotification, and enables GCController.shouldMonitorBackgroundEvents if it hadn't been already. On iOS and tvOS, GCController.shouldMonitorBackgroundEvents is ignored, so there's no need to check their versions.
Jan200101 bb0b6dd4 2022-05-02T20:12:13 Fixed using WGI without XInput
Carl Friess 2ccb0dfd 2022-04-13T15:39:29 Check for macOS 10.16 to support apps built with older macOS SDKs
Sam Lantinga e551384a 2022-04-26T14:54:14 Added functions to get the platform dependent name for a joystick or game controller
Jibb Smart 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
Dimitriy Ryazantcev c39df2fb 2021-12-22T18:27:10 joystick: get HID top-level collection preparsed data directly from RawInput API.
Mathieu Eyraud 0b2a55ea 2022-02-02T14:58:33 Fix typo
meyraud705 3dcfe860 2022-02-02T13:59:49 Add joystick battery event
meyraud705 0964c84d 2022-02-02T11:21:32 Always use SDL_PrivateJoystickBatteryLevel to update battery level But do not use it for initialisation.
Sam Lantinga 8986efd6 2022-04-22T14:21:46 Added support for the Backbone One controller on iOS
Sam Lantinga 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.
Sam Lantinga 04bf7c94 2022-04-22T09:36:39 Fixed build
Sam Lantinga d9b5805b 2022-04-22T09:12:48 Return a correlation error when trigger rumble is attempted without correlation
Cameron Gutman 145824f6 2022-04-21T01:38:53 WGI: Only call RoUninitialize() if RoInitialize() succeeded
Cameron Gutman 00b2e10a 2022-04-20T20:58:29 WGI: Keep a reference to the MTA to avoid crashing on COM teardown Fixes #5552 Fixes #5270
Sam Lantinga 57927a24 2022-04-18T12:57:28 Don't call scandir() inside of scandir() This works around a crash in address sanitizer
Jan Beich 7c140429 2021-08-03T07:18:02 Enable evdev-based gamecontrollerdb on FreeBSD
Sam Lantinga e7b01ee7 2022-04-18T09:55:52 Added controller mapping for the Thrustmaster Dual Analog 3.2 on Linux
Mathieu Eyraud 99ae6395 2022-04-12T10:04:05 Initialise scandir argument 'scandir' does not initialise 'entries' on error
Sam Lantinga 7ea1b69d 2022-04-05T21:00:07 Sort controllers by the js* index on Linux Also fixed the initial scan to directly scan devices instead of using udev so they can be sorted, as intended. Fixes https://github.com/libsdl-org/SDL/issues/4688
Sam Lantinga eb660e86 2022-04-05T19:43:42 Cache the fact that a device didn't look like a joystick Fixes https://github.com/libsdl-org/SDL/issues/5211
Ozkan Sezer 312c899f 2022-04-02T03:32:10 attempt to fix uwp build
Sam Lantinga 8ebef12d 2022-04-01T14:58:33 Use RoInitialize/RoUninitialize for Windows.Gaming.Input Thanks @walbourn! Fixes https://github.com/libsdl-org/SDL/issues/5270
Cameron Gutman 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.
Kimplul 2398c43b 2022-03-24T14:34:37 add some Thrustmaster wheels
Ryan C. Gordon 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.
Sam Lantinga 006aafab 2022-03-22T20:23:09 Fixed freeing a constant string (thanks @gnrlwart)
Egor 2302b2d5 2022-03-22T16:33:45 Add mapping for Logitech Precision Gamepad
Sam Lantinga 1868c5b5 2022-03-17T18:25:50 Start rumbling once a raw input controller has been correlated Fixes https://github.com/libsdl-org/SDL/issues/5351
Sam Lantinga b22ce2b5 2022-03-17T17:10:40 Workaround for bug in Microsoft WGI support Fixes https://github.com/libsdl-org/SDL/issues/5270
Sam Lantinga bcb0f1de 2022-03-17T08:52:31 Fixed build when events are disabled Fixes https://github.com/libsdl-org/SDL/issues/5413
Cameron Gutman 677dc101 2022-03-09T19:43:29 rawinput: Fix double detection of gamepads on some 3rd party X360 wireless receivers The name that the Raw Input joystick driver pulls from the HID stack comes from USB string descriptors contained on the device. For official wireless receivers, this always contains "Xbox 360 Wireless Receiver for Windows" which matches the friendly name that WGI provides. 3rd party Xbox 360 wireless receivers may have different strings in their USB string descriptors (one uses "XBOX 360 For Windows" instead). This fails to match WGI's name and causes Raw Input and WGI to both report the same gamepad. Since wireless Xbox 360 controllers seem to have a consistent VID/PID regardless of the adapter enumerating them, we can also match on that to catch these. The duplicate case reported to me was: Controller (XBOX 360 For Windows) - 030000005e040000a102000000007200 Xbox 360 Wireless Receiver for Windows - 030000005e0400000000000000007701
Sam Lantinga 6a787619 2022-03-08T18:42:13 Allow reading background events for MFi controllers
Sam Lantinga 1b766937 2022-03-08T09:58:24 Fixed the SDL controller type for USB_PRODUCT_XBOX_ONE_XINPUT_CONTROLLER
Sam Lantinga af40cb6f 2022-02-23T15:49:10 Added support for the Razer Huntsman Analog keyboard in controller mode