src/joystick


Log

Author Commit Date CI Message
Sam Lantinga b73703b9 2018-11-19T21:17:00 Fixed bug 4391 - hid_enumerate() sometimes causes game to freeze for a few seconds Daniel Gibson Even though my game (dhewm3) doesn't use SDL_INIT_JOYSTICK, SDL_PumpEvent() calls SDL_JoystickUpdate() which ends up calling hid_enumerate() every three seconds, and sometimes on my Win7 box hid_enumerate() takes about 5 seconds, which causes the whole game to freeze for that time.
Sam Lantinga 2e348c1f 2018-11-14T13:37:22 Fixed bug 3193 - Dualshock 3's motion sensors overwrite analog stick maxxus The Dualshock 3's motion sensors don't seem to be reported by the call to EVIOCGBIT but they still send EV_ABS events. Because they're not reported by EVIOCGBIT they're not assigned a proper axis ids and the default of 0 is used, which is the valid id for the left analog sticks left/right axis.
Ozkan Sezer d42728ec 2018-11-01T12:35:00 fix NetBSD C90 build failure src/vendor/SDL2/src/joystick/bsd/SDL_sysjoystick.c:353:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] reported by 'bch' at https://discourse.libsdl.org/t/25231
Ryan C. Gordon 62494a2e 2018-10-31T15:03:41 Merge SDL-ryan-batching-renderer branch to default.
Micha? Janiszewski 91820998 2018-10-28T21:36:48 Add and update include guards Include guards in most changed files were missing, I added them keeping the same style as other SDL files. In some cases I moved the include guards around to be the first thing the header has to take advantage of any possible improvements compiler may have for inclusion guards.
Sam Lantinga 14c55ac8 2018-10-26T20:20:28 This change looks okay in the general case. If we run into problems where these events aren't dispatched (initialized on a different thread than the main thread?) we may need to create a separate thread to handle device notifications like we do with the windows joystick subsystem.
Ryan C. Gordon be8ef94f 2018-10-26T14:43:39 hidapi: Don't run a separate event loop for device notifications. Fixes Bugzilla #4286.
Sam Lantinga 14329256 2018-10-25T16:53:14 Generalized the XInput user index into a player index
Sam Lantinga 545febcf 2018-10-25T13:22:34 Fixed initializing XInput user index
Sam Lantinga 9987ca69 2018-10-25T12:54:42 Added SDL_JoystickGetXInputUserIndex()
Sam Lantinga 4d4e18c4 2018-10-25T12:54:39 Added vi style for the Emscripten joystick code
Ryan C. Gordon b262b0eb 2018-10-22T20:50:32 Small stack allocations fall back to malloc if they're unexpectedly large.
Steven M. Vascellaro ff3bb857 2018-10-22T10:55:18 joystick: Add Linux mappings for "Xbox One Wireless Controller (Model 1708)" Adds controller bindings to support the "Xbox One Wireless Controller (Model 1708)" on Linux. The Model 1708 was released in 2016 alongside the Xbox One S. It is the current model being sold by Microsoft as of writing. (October 22, 2018)
Sam Lantinga 708ad1fd 2018-10-16T14:58:07 Fixed updating the rumble parameters on Linux
Sam Lantinga 62f806ed 2018-10-08T19:46:01 This device gets Xinput driver loaded on windows.
Sam Lantinga f01cdced 2018-10-05T01:41:59 It turns out HIDAPI for Xbox controllers doesn't allow background input, so we won't enable it by default on Windows.
Sam Lantinga 41ee51b9 2018-10-04T15:23:42 Fixed updating bindings for controllers using the wildcard mappings
Sam Lantinga 19445561 2018-10-02T20:51:33 Make sure we don't read and write to HIDAPI at the same time, it's not thread-safe on Windows
Sam Lantinga 48f7e7f3 2018-09-30T22:43:12 Corrected PS4 controller entry
Ozkan Sezer 5454765a 2018-09-28T17:01:24 replace bool stuff in controller_type.h with SDL_bool. remove bool<->SDL_bool dance in SDL_joystick.c:SDL_IsJoystickSteamController() after the controller_type.h change.
Ozkan Sezer fde82e59 2018-09-28T14:01:40 SDL_hidapi_ps4.c: add HAVE_ENDPOINTVOLUME_H check to win32 volume code. this makes it build with my old toolchain with mingw-w64 1.0.10 headers
Sam Lantinga 9aa8a75d 2018-09-28T01:18:54 Fixed building with Xcode 10.0
Sam Lantinga f964ce03 2018-09-28T01:00:47 Fixed mingw-w64 build
Sam Lantinga aa9683bb 2018-09-25T19:41:33 Added 8bitdo SF 30 PRO controller support for Linux / DInput mode (thanks Frank Hartung)
Ozkan Sezer 870c44bf 2018-09-25T09:20:56 safer this way, just in case..
Sam Lantinga cd90e2ca 2018-09-24T16:33:14 Fixed bug 4267 - linkage failure with --enable-hidapi because of missing libudev symbols Ozkan Sezer hidapi dynamic udev initial patch
Sam Lantinga 5febdfce 2018-09-24T11:49:25 Fixed whitespace
Sam Lantinga d07fe7ad 2018-09-21T09:41:21 Removed button logging message
Sam Lantinga e8b0859f 2018-09-20T15:55:52 Added missing call to WindowsDeleteString()
Sam Lantinga 600126c9 2018-09-19T10:03:40 Added experimental support for Windows.Gaming.Input
Sam Lantinga 59a2d12c 2018-09-17T11:35:22 Fixed creating an Android game controller mapping for HIDAPI devices on initialization
Sam Lantinga 6a7b0c27 2018-09-14T12:41:29 Fixed crash launching under Steam on Mac OS X
Ozkan Sezer 33381d3d 2018-09-07T11:03:24 hidapi/SDL_hidapijoystick.c: fix build in C90 mode: src/joystick/hidapi/SDL_hidapijoystick.c: In function 'HIDAPI_InitializeDiscovery': src/joystick/hidapi/SDL_hidapijoystick.c:281: error: 'true' undeclared (first use in this function) src/joystick/hidapi/SDL_hidapijoystick.c:281: error: (Each undeclared identifier is reported only once src/joystick/hidapi/SDL_hidapijoystick.c:281: error: for each function it appears in.) src/joystick/hidapi/SDL_hidapijoystick.c: In function 'HIDAPI_UpdateDiscovery': src/joystick/hidapi/SDL_hidapijoystick.c:339: error: 'true' undeclared (first use in this function) src/joystick/hidapi/SDL_hidapijoystick.c:341: error: ISO C90 forbids mixed declarations and code
Sam Lantinga 80021c21 2018-09-05T15:28:06 Speculatively disable rumble on the Razer Panthera Evo, which doesn't have rumble motors and probably hangs in the same way the Panthera does.
Sam Lantinga 96259f1f 2018-09-05T12:16:01 Don't overwrite the default binding when changing the binding for a controller that was using the default.
Sam Lantinga 963e74d6 2018-09-05T11:24:23 Added binding for Mad Catz FightStick TE S+ (PS3) on Mac OS X
Sam Lantinga c152e380 2018-09-05T11:18:50 Added support for the Razer Panthera Fightstick Fixed bindings for the Mad Catz FightStick TE S+
Sam Lantinga 34237b80 2018-08-31T18:10:21 Better fix to make sure we're only returning controllers from the HIDAPI joystick API
Sam Lantinga 4ffcd88c 2018-08-31T17:47:34 Removed VID/PID 0x1532/0x0037, which was listed in the Linux kernel as a Razer Sabertooth, because at least one variant of the Razer DeathAdder mouse shows up with this VID/PID.
Sam Lantinga 5ef8eb49 2018-08-29T20:55:02 Don't show the Razer Raiju sound interface as a game controller
Sam Lantinga 207428b4 2018-08-29T20:23:39 Don't rumble Bluetooth PS4 controllers by default, as that switches the controller into extended input report mode, which breaks games that use DirectInput.
Sam Lantinga 16ccff3c 2018-08-29T20:23:36 Fixed whitespace
Sam Lantinga fda14741 2018-08-29T18:56:54 Fixed Xbox One S Bluetooth support on Mac OS X
Sam Lantinga 6b3f11e2 2018-08-20T21:18:56 Fixed code style
Ozkan Sezer 90454b1e 2018-08-16T11:01:02 SDL_hidapi_ps4.c: define NTDDI_VISTA / _WIN32_WINNT_VISTA if not defined it still needs a Vista or newer Platform SDK to build, though.
Sam Lantinga 7d3a7ef8 2018-08-15T23:35:54 Use a single hint for both Xbox 360 and Xbox One controllers, since they are often the same driver.
Sam Lantinga a2add1f6 2018-08-15T23:14:45 Use the HIDAPI driver for Xbox controllers on Windows, and determine the XInput mapping at runtime for extended functionality like rumble and guide button.
Sam Lantinga 3f5ff751 2018-08-15T23:14:43 Use a unified name list for Xbox 360 and Xbox One controllers for drivers that can handle both
Sam Lantinga aad340eb 2018-08-15T19:53:36 Added Windows Xbox controller state packet handling, for completeness.
Sam Lantinga 63107524 2018-08-15T19:53:34 Fixed input from the Steam Virtual Gamepad on Mac OS X
Sam Lantinga 0903e835 2018-08-15T19:53:31 Use SDL specific window class to avoid conflicting with Steam
Sam Lantinga c8866658 2018-08-15T19:53:30 Catch device removal as well as device arrival on Windows
Sam Lantinga 641c674f 2018-08-15T19:53:28 Turned off debug messages
Sam Lantinga 51902010 2018-08-15T19:53:26 Remove the HIDAPI device if we get a read error from it This fixes detecting PS4 controller disconnect on Mac OS X, where there isn't any device removed notification
Sam Lantinga dfbd7f65 2018-08-15T19:53:24 Fixed Mac OS X build
Sam Lantinga ec74c318 2018-08-15T19:53:22 Polling hid_enumerate() every 3 seconds causes freezes and stutters on some USB audio devices and mice. We'll only enumerate devices when we get notification that the system devices have changed
Ryan C. Gordon 67a48ad1 2018-08-10T15:04:08 haiku: Patched to compile with new joystick interfaces.
Ryan C. Gordon e1ac643b 2018-08-10T14:54:26 bsd: Patched to compile. (I think.)
Ryan C. Gordon 67764070 2018-08-10T14:42:40 bsd: Update joystick code for new interfaces. (this is an untested push to see if buildbot likes it.)
Ryan C. Gordon b692c352 2018-08-10T14:32:30 emscripten: Patched to compile with new joystick interfaces.
Ryan C. Gordon 941f8ecf 2018-08-10T14:10:47 joystick: define inline to SDL_INLINE
Ryan C. Gordon 0b2863d4 2018-08-10T14:09:44 joystick: #if 0'd out some things that aren't currently used. Fixes some compiler warnings.
Ozkan Sezer a7c3d2af 2018-08-10T11:50:55 SDL_hidapi_ps4.c: lowercase windows header names.
Sam Lantinga 4f41f07d 2018-08-09T16:05:48 Added missing files from previous commits
Sam Lantinga 31b02243 2018-08-09T16:04:45 Added notes that this code was contributed by Valve
Sam Lantinga 99759bac 2018-08-09T16:04:34 There's no controller that's supported by both XInput and HIDAPI
Sam Lantinga ab07ce11 2018-08-09T16:04:30 Don't update the device list for devices we know aren't supported This should reduce HID enumeration (hitting the USB bus) if for some reason we're getting spammed with false device insert/removal events
Sam Lantinga 28e0c0ee 2018-08-09T16:04:21 Sam Lantinga <slouken@libsdl.org> 2018-08-06 13:00 -0700 Backed out changeset 794a209b2270 http://hg.libsdl.org/SDL/rev/2e2ecdac957c
Sam Lantinga 25a952e7 2018-08-09T16:04:18 Sam Lantinga <slouken@libsdl.org> 2018-08-06 11:58 -0700 Removed mapping for VID/PID 0x0079/0x0006, which is a generic PCB used in many different devices http://hg.libsdl.org/SDL/rev/794a209b2270
Sam Lantinga 888bf1af 2018-08-09T16:03:50 Worked around bug with Sony PS Now PS3 controller where DirectInput polling will continue to return success after the controller is unplugged. The code is now reliant on SDL_PrivateJoystickAdded() and SDL_PrivateJoystickRemoved() being called correctly when devices are added or removed on Windows
Sam Lantinga f35e97ba 2018-08-09T16:03:29 Fixed Windows build
Sam Lantinga d2042e1e 2018-08-09T16:00:17 Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms. Added SDL_GameControllerRumble() and SDL_JoystickRumble() for simple force feedback outside of the SDL haptics API
Sam Lantinga a37d3e0b 2018-08-06T13:00:11 Backed out changeset 794a209b2270 It turns out the mapping is correct, just the name was confusing
Sam Lantinga cc682f20 2018-08-06T11:58:08 Removed mapping for VID/PID 0x0079/0x0006, which is a generic PCB used in many different devices Different device with same vid/pic that is kind of a Saitek shape: https://www.trust.com/en/product/17416-gxt-24-runa-compact-gamepad n64 with same ID https://bbs.archlinux.org/viewtopic.php?id=163488 PS shaped with numbers for buttons https://pineight.com/mw/index.php?title=USB_game_controller#DragonRise_Inc._Generic_USB_Joystick fightstick with same vid/pid https://retropie.org.uk/forum/topic/7594/bartop-2-player-zero-delay-encoders-not-working
Ryan C. Gordon 862aa4b4 2018-07-22T19:28:27 windows: Fixed some Visual Studio warnings about shadowed variables. Fixes Bugzilla #4118.
Sam Lantinga 864b8f89 2018-06-12T01:04:26 Merged in community contributed controller mappings from https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt
Sam Lantinga 12059782 2018-06-12T00: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!
Sam Lantinga db86e7a6 2018-06-07T10:54:54 Added support for the PS3 controller driver in PlayStation Now
Sam Lantinga ff6aebc4 2018-05-29T08:03:44 Added a new GUID for DS3 controller connected over bluetooth, for both Sony and Shanwan (thanks William!)
Sam Lantinga b3173d9d 2018-05-23T17:15:37 Added support for the NVIDIA SHIELD handheld gaming device
Sam Lantinga 361043a5 2018-05-23T17: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.
Sam Lantinga 4d9a3469 2018-05-23T16:00:21 Added additional supported Android controllers
Sam Lantinga c07656db 2018-05-23T16:00:19 Fixed default mapping for Android controller triggers (they were reversed)
Sam Lantinga 999af809 2018-05-18T13:09:30 Merged latest changes from Steam Link app
Sam Lantinga b7228bc5 2018-04-11T18:28:03 Added support for the GameSir G3w
Sam Lantinga b41b9d34 2018-03-19T14:52:53 Fixed return value
Sam Lantinga 8e062f69 2018-03-19T14: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
Sam Lantinga d529b001 2018-03-19T13: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.
Sam Lantinga 129431b4 2018-03-08T16: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
Sam Lantinga 92847022 2018-03-07T18:10:01 Added a mapping for the latest firmware for the Xbox One S controller on Android
Sam Lantinga a2c1d83c 2018-03-07T18: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.
Sam Lantinga a8ac5885 2018-03-07T13:30:40 Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened
Sam Lantinga 9e651b69 2018-03-06T14: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.
Sam Lantinga 003c0dce 2018-03-02T10:56:21 Use the real controller name for game controllers on iOS and Apple TV
Ethan Lee 6e3d0a13 2018-02-21T12:42:30 Use new XInput mapping for Win10+ (Bugzilla #3960)
Sam Lantinga 7c360027 2018-02-09T16:01:11 Fixed compiler warning on Android
Sam Lantinga 965c11f3 2018-02-07T14: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
Sam Lantinga 73c26c20 2018-02-06T16:43:31 Send Apple TV remote input as key events unless it's opened as a joystick, to match Android behavior.
Sam Lantinga f59b9c8b 2018-02-06T15: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.
Sam Lantinga 2b441ec6 2018-02-05T11:40:39 SDL Changes to support clean reads CR: saml