kc3-lang/SDL/src/joystick

Branch :


Log

Author Commit Date CI Message
862aa4b4 2018-07-22 19:28:27 windows: Fixed some Visual Studio warnings about shadowed variables. Fixes Bugzilla #4118.
864b8f89 2018-06-12 01:04:26 Merged in community contributed controller mappings from https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt
12059782 2018-06-12 00:18:10 Added common controllers used with Steam Big Picture These are entirely untested Several USB ids refer to multiple packaged products. In those cases I tried to use the most common name, or a general name (e.g. PS3 Controller), or a completely generic name (e.g. USB gamepad) if it wasn't clear what type of controller it was. Patches welcome!
db86e7a6 2018-06-07 10:54:54 Added support for the PS3 controller driver in PlayStation Now
ff6aebc4 2018-05-29 08:03:44 Added a new GUID for DS3 controller connected over bluetooth, for both Sony and Shanwan (thanks William!)
b3173d9d 2018-05-23 17:15:37 Added support for the NVIDIA SHIELD handheld gaming device
361043a5 2018-05-23 17:15:33 Actually left trigger is motion axis 17 and right trigger is motion axis 18, which will map in that order to SDL axes.
4d9a3469 2018-05-23 16:00:21 Added additional supported Android controllers
c07656db 2018-05-23 16:00:19 Fixed default mapping for Android controller triggers (they were reversed)
999af809 2018-05-18 13:09:30 Merged latest changes from Steam Link app
b7228bc5 2018-04-11 18:28:03 Added support for the GameSir G3w
b41b9d34 2018-03-19 14:52:53 Fixed return value
8e062f69 2018-03-19 14:42:51 Generalized the handling of instantaneous guide button presses so there's a minimum of 100 ms between guide button press and release. This happens with at least the following controllers: All Apple MFI controllers, ASUS Gamepad, XiaoMi Bluetooth Controller
d529b001 2018-03-19 13:16:11 Added mapping for the ASUS Gamepad removing the guide button, which doesn't generate events even though it's reported in the Android APIs.
129431b4 2018-03-08 16:32:22 Delay delivery of the pause button release on MFI controllers so it doesn't happen in the same frame as the button press
92847022 2018-03-07 18:10:01 Added a mapping for the latest firmware for the Xbox One S controller on Android
a2c1d83c 2018-03-07 18:09:58 Include a USB VID/PID for Apple MFI controllers This is just placeholder VID/PID, but allows code that works with VID/PID to identify the MFI controllers easily.
a8ac5885 2018-03-07 13:30:40 Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened
9e651b69 2018-03-06 14:51:50 Try to dynamically create a default Android game controller mapping based on the buttons and axes on the controller. Include the controller USB VID/PID in the GUID where possible, as we do on other platforms.
003c0dce 2018-03-02 10:56:21 Use the real controller name for game controllers on iOS and Apple TV
6e3d0a13 2018-02-21 12:42:30 Use new XInput mapping for Win10+ (Bugzilla #3960)
7c360027 2018-02-09 16:01:11 Fixed compiler warning on Android
965c11f3 2018-02-07 14:07:54 Fixed bug 4060 - Alternative DualShock 4 v2 controller GUID ayer.3d I have a DualShock 4 v2 controller with a GUID that's not in the database. There is an existing GUID that is almost identical, with the only difference that I can tell being the reported version string (mine being 8001, database is 8100). Existing GUID: 050000004c050000cc09000000810000 New GUID: 050000004c050000cc09000001800000 When connected via USB, the GUID matches an existing entry: 030000004c050000cc09000011810000
73c26c20 2018-02-06 16:43:31 Send Apple TV remote input as key events unless it's opened as a joystick, to match Android behavior.
f59b9c8b 2018-02-06 15:03:38 Replaced SDL_HINT_APPLE_TV_REMOTE_SWIPES_AS_ARROW_KEYS with SDL_HINT_TV_REMOTE_AS_JOYSTICK which controls whether remotes on iOS and Android are interpreted as joysticks (the default) or as return/escape/arrow keys.
2b441ec6 2018-02-05 11:40:39 SDL Changes to support clean reads CR: saml
e99daaf8 2018-01-22 09:45:16 android: Fixed compiler warning about nested '/*' comments.
e3cc5b2c 2018-01-03 10:03:25 Updated copyright for 2018
fee2469c 2017-12-19 10:48:29 Fixed bug 4005 - Android, SDL_IsGameController() crashes is index is out of range Sylvain On Android, if you give an invalid index to SDL_IsGameController(), it will crash in SDL_SYS_IsDPAD_DeviceIndex().
e5cfa241 2017-12-16 10:40:47 Fixed default Android D-PAD mapping so the back button is treated as B
255362a3 2017-12-16 10:40:45 Fixed handling of the Apple TV remote buttons The menu button on the remote is the back button
cc30e1eb 2017-12-16 10:40:43 Added support for the ASUS TV500BG Android gamepad
688bc285 2017-11-20 13:59:43 Steam Virtual GamePad config for macOS
c954b538 2017-11-02 08:48:14 Fixed bug 3935 - Not find joysticks if android run 24-48 days. Alexander Orefkov In src\joystick\android\SDL_sysjoystick.c in SDL_SYS_JoystickDetect when SDL_GetTicks return number grater 2147483648 (after 24.85 days uptime) SDL_TICKS_PASSED(SDL_GetTicks(), timeout) return FALSE and Android_JNI_PollInputDevices is never calling. And in JoystickByDeviceId - when search for newly added joystic - after SDL_SYS_JoystickDetect item not reinitilized, and always stay NULL, cause return NULL instead of added joystick.
a7d2d12c 2017-11-01 10:07:04 Fixed building on non-Android platforms
a90be440 2017-11-01 10:06:58 Added controller mapping for Android TV remotes Also fixed the back button on the remote exiting the application
556a8544 2017-10-16 15:22:40 Fixed compiler warning on iOS
b647bd06 2017-10-10 17:41:41 The event filter and event watch functions are now thread-safe
d90fce3c 2017-10-10 11:10:15 Exposed the joystick locking functions for multi-threaded access to the joystick API
2657dfae 2017-10-09 11:45:15 Fixed crash in SDL_IsGameController() on Windows if called when a controller is being removed
b120fb87 2017-10-08 10:59:03 Fixed bug 3865 - [PATCH] Support for GreenAsia Inc. PSX to USB converter as SDL_GameController Manuel I would like this small patch merged that adds support for my GreenAsia Inc. PSX to USB converter, so SDL_IsGameController() returns true when using this adaptor. It's interesting because PSX/PS2 controllers connected using this model won't be detected as gamecontrollers otherwise, only as joysticks.
5ab5c9b7 2017-09-22 08:56:09 Avoid duplicate joystick axis events
2fd52351 2017-09-22 08:32:31 Added stubs for simple Steam Controller support
d8286479 2017-09-22 08:30:52 Added stubs for simple Steam Controller support
eaab6098 2017-09-21 10:29:17 Only apply the jitter filter to prevent unexpected motion on axes that haven't been touched.
46ec1305 2017-09-14 21:45:14 Fix for 3829. Revert adding GameSir G4s, uses same GUID as PS3 controller.
73c85e98 2017-09-14 19:33:32 Readd support for GameSir G4s, lost with changeset 11431
ac782d71 2017-09-12 05:53:47 Added support for the PDP Battlefield One Xbox One controller on Linux
0ddac338 2017-09-08 07:15:47 keep joystick thread from waking unnecessarily, and from possibly blocking for 300ms at shutdown if a joystick was just plugged in CR: SamL
20207abf 2017-08-31 22:07:28 macOS: Update controller mapping of Steelseries Stratus XL to account for reversed thumbstick y-axis values (bug #3483).
b54bcb34 2017-08-30 23:30:24 Fixed bug 3483 - Steelseries Nimbus MFi controller reversed Y-axis analog stick benjamin.feng Probable underlying cause: https://bugzilla.libsdl.org/show_bug.cgi?id=3124#c5 "If you download and build the HID Calibrator sample you can see that these are totally legitimate HID devices (except for inverting the Y-axis of joysticks, which is contrary to the HID specification but does make them more compatible with games compiled expecting XBOX controllers)."
8e160a34 2017-08-30 23:02:39 Convert tabs to spaces in game controller database entries
2a945b44 2017-08-28 10:03:39 Fixed bug 2361 - [Android] Joysticks do not have unique IDs David Brady When I attempted to make a mapping file for Android gamepads, I quickly discovered that most of the ones that I have here show up as the same device (Broadcom Bluetooth HID), meaning that it was impossible to make mappings on Android, since every device looked the same. This patch will check for the existence of the getDescriptor function added in Jelly Bean, and use it if it's there. The Android Dashboard says that the majority of Android phones should support this function, and doing it this way will not force us to bump up our API version.
0d011ec6 2017-08-28 00:22:23 Renaming of guard header names to quiet -Wreserved-id-macro
bbd9acdd 2017-08-26 21:20:20 Add support for GameSir G4s
de91b124 2017-08-14 06:28:21 Fixed bug 3745 - specify SDLCALL as the calling convention for API callbacks Patches contributed by Ozkan Sezer
ca5c3048 2017-08-13 21:06:52 Fixed bug 3744 - missing SDLCALL in several functions Ozkan Sezer The attached patch adds missing SDLCALL to several functions, so that they properly match the headers as intended.
ddeaa601 2017-08-13 20:42:41 Fixed bug 3299 - DirectInput: Incorrect joystick mapping when attaching new joysticks Jimb Esser Note: This is using DirectInput, I have to disable XInput as that causes all but the first 4 controllers to be completely ignored by SDL (I can find no way to reconcile XInput devices with DirectInput devices, otherwise I would make a patch that accepts the fifth and later controllers with DirectInput...). XInput does not seem to have the problem below, only DirectInput. I plug in 3 identical wireless Xbox 360 controllers, call them J1, J2, J3. Direct Input shows them as having GUIDs G1, G2, G3. I unplug J1, then J2 and J3 show up as having GUIDs G1 and G2! Not so "unique"... I start my SDL app when just J2 and J3 are plugged in, and open J2 and J3. Then I plug in a new controller, SDL sees that now G3 exists, assigns that a new SDL joystick instance ID, which I request to be opened, but G3 at this point is J3, which I already had opened! So I end up with two instances of J3 opened, and none of J1. "Re-"opening G1 would get the actual handle to the newly attached controller, but there's no current way to know this. This is clearly a bug or poor design in DirectInput or my wireless receiver drivers, but is a showstopping bug for my 8-20 player games (as soon as any one controller runs out of battery or goes to sleep and gets turned back on, suddenly things are busted requiring a restart (or, at least, a reinitialization of all controllers - the game can't go on)). The solution I found is to use HID paths instead of GUIDs to uniquely identify joysticks. GUIDs are still needed to open a controller, however I have added code to re-find the GUIDs for all joysticks whenever a new joystick is attached or removed. This does now require opening of all joysticks (instead of just enumerating them), though if your app, like mine, is opening all of them anyway so that any can press a button to join, that doesn't change much (although perhaps they joysticks should be kept open in this case, instead of closed and re-opened). If your app only ever opens one joystick, this will do more work at startup than it did previously.
ea9bc659 2017-08-13 20:39:00 Added check for XBOX in addition to Xbox and X-Box
059d9e46 2017-08-12 17:41:59 Fixed bug 2950 - wrong axes values are set on joystick initialization Edward Rudd Device: Logitech Rumble Gamepad F510 in Xinput mode. Upon opening the joystick the values of the axes are queried via PollAllValues are not actually set on the device all the time. This can easily be seen in the testjoystick or testgamecontroller test programs,as the testjoystick shows all axes in the center until one 'tickles' the triggers., and the testgamecontroller will show the triggers as 'on' until on 'tickles' the triggers. Upon further research the culprit is the SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS hint. In the default value events are ignored until there is an active window, Thus in cases where the joystick system is initialized and controllers opened before the initial window is created & focuses, the initial values will be incorrect. Here is my current workaround in the game I'm working on porting.. SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1"); SDL_GameController* gamepad = SDL_GameControllerOpen(index); SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "0");
0a52db54 2017-08-12 08:15:09 Fixed bug 3191 - haptic system on android? Patch provided by jintiao and Milan Nikolic, thanks!
b425050b 2017-08-12 00:04:46 Fixed compiler warnings on Visual Studio 2013
af44a595 2017-08-09 20:20:35 Fixed bug 3672 - Add joystick to controllerdb Moritz M-H The following entry needs to be added to the gamecontrollerdb for the Qanba fighter stick under linux
03250690 2017-08-09 12:38:20 Added a private hint for Steam to bypass the controller filtering for the Steam virtual gamepad
f15dbc8f 2017-08-09 12:11:59 Fixed Linux build
c49fa37c 2017-08-09 11:59:29 Added SDL hints to filter the set of game controllers reported by SDL
4e43c631 2017-08-08 20:38:23 Re-added missing entry for the Steam Virtual Gamepad (was Valve Streaming Gamepad)
c544d2b9 2017-08-02 23:42:08 Add support for Saitek P990 Dual Analog Pad
84aeab17 2017-07-29 23:00:14 haiku: Changed header paths to be more compatible.
49f846f1 2017-07-11 19:27:50 Added support for an XBox One wired controller for Leo L?nnenm?ki
22c221f3 2017-06-11 22:30:58 linux: Changed internal functions to be static.
871d43a8 2017-06-08 22:40:09 Removed unused hint includes.
4b47fa38 2017-06-04 23:15:47 Removed duplicate includes.
cc5b4f45 2017-05-12 23:01:17 emscripten: Changed internal functions to be static.
60f28484 2017-05-07 21:02:46 haiku: Fixed crash on quit if max number of joysticks was connected.
d7cd6537 2017-04-27 15:52:37 Added Steam Controller mappings for Linux and iOS
27023ed2 2017-04-07 03:39:43 Added support for the Cyborg V.3 Rumble Pad and the Mad Catz FightPad PRO
1eb92f63 2017-04-06 06:30:43 Implemented Linux joystick blacklist Based on https://raw.githubusercontent.com/denilsonsa/udev-joystick-blacklist/master/generate_rules.py This fixes a few devices that are not actually joysticks showing up as such in SDL
53f3786b 2017-04-04 08:43:44 Added support for a number of game controllers, including the Nintendo Switch Pro Controller
00da0824 2017-03-23 13:53:09 Updated axis/button mapping for Dualshock 3, for upcoming Sony driver changes
763e1389 2017-03-09 16:09:16 Added an API to get the joystick instance ID before opening the device: SDL_JoystickGetDeviceInstanceID()
ca0bf151 2017-03-03 16:38:17 Fix some more compiler warnings on armcc.
a9762551 2017-02-20 11:02:35 Added config for the Razer Wildcat on Mac OS X
9428ff19 2017-02-17 17:46:58 Added support for the Razer Wildcat on Linux
8eee82cd 2017-02-03 23:30:43 Windows: Fixed warning about unused variable. Found by buildbot.
710ae62a 2017-02-02 17:33:40 Remember XInput controllers that we've already seen, so when the raw device list changes we don't assign the old device to the new XInput userid. This isn't perfect, but at least we won't report the same device twice.
8f78f5bb 2017-02-02 16:56:02 Fixed build on Apple TV
be28d7c8 2017-01-31 12:30:55 Added support for the Saitek Pro Flight X-56 Rhino
6717a3d3 2017-01-31 12:23:29 Added support for the HOTAS Warthog throttle
a156b0d9 2017-01-31 10:20:09 Added the HOTAS Warthog as a flight stick
d0247368 2017-01-27 18:06:50 Sorted controller entries
95ab9dc7 2017-01-27 06:05:50 Added Thrustmaster Wheel FFB entry to the list of wheels
3c90a52a 2017-01-27 05:59:58 Added an API to get the type of a connected joystick
aa90b730 2017-01-26 21:25:05 Add a mapping for Xbox Wireless Controllers running old firmware Also updates the naming of these Xbox Wireless Controllers connected via USB (and thus the third-party Xbox Controller Driver) to match. The Xbox Wireless Controller entries are now listed, in order, via USB, bia Bluetooh (with older firmware) and via Bluetooth (with firmware 3.1.1221.0).
ae5e9a31 2017-01-25 22:24:54 Add gamecontrollerdb mapping for Xbox One S on Mac This is valid for firmware version 3.1.1221.0; earlier versions of the firmware need a different mapping (and have different GUIDs).
ca89d9b5 2017-01-25 22:22:05 Darwin: fix detection of Xbox One S controller Firmware revision 3.1.1221.0 changes the mapping of the Xbox One S controller in Bluetooth mode. Aside from changing the layout of other buttons, this revision also changes the triggers to act as Accelerator and Brake axes from the simulation controls page. The Darwin sysjoystick code didn't previously map anything at these axes, making it impossible to detect input on these two buttons.
8fa0b088 2017-01-20 08:13:23 Added support for the 8Bitdo Zero GamePad
f3540242 2017-01-18 12:19:57 Removed unused variable
b0c5ceef 2017-01-18 12:18:50 Fixed bug 3533 - Enumeration joystick devices omitted during directinput enumeration white.magic The logic which decides if a device enumerated via the direct input system in the function EnumJoysticksCallback in SDL_dinputjoystick.c is processed is discarding valid joystick devices due to the assumption that devices of the type DI8DEVTYPE_SUPPLEMENTAL are not valid devices. This change was added with 2.0.4 with this commit http://hg.libsdl.org/SDL/rev/1b9d40126645 that is linked to this bug report https://bugzilla.libsdl.org/show_bug.cgi?id=2460 which indicates that in that case devices of the type DI8DEVTYPE_SUPPLEMENTAL were not desirable as they caused a singular device to emit multiple "device added" events. Since then there appear to have been a few fixes to handle devices that fall into various other classes in the following two commits: http://hg.libsdl.org/SDL/rev/10ffb4787d7a and http://hg.libsdl.org/SDL/rev/6a2bbac05728 Two devices I have reports of failing to be listed when the DI8DEVTYPE_SUPPLEMENTAL type is excluded are ECS Gametric Throttle and Thrustmaster MFD Cougar. Sam Lantinga I verified that the OUYA controller shows up as a single device with this change, so I've reverted the change to ignore supplemental devices, leaving framework in place to easily add devices that we want to ignore.
5cb1ca55 2017-01-18 11:57:27 Fixed building with mingw32