Commit Graph

191 Commits

Author SHA1 Message Date
Sam Lantinga
a850fec733 Added missing mapping for the Xbox Elite Controller on Linux
This fixes https://github.com/ValveSoftware/steam-for-linux/issues/7826
2021-07-26 15:05:02 -07:00
Sam Lantinga
dc6f044309 Added mapping for the Xbox Series X controller on tvOS 2021-07-12 17:57:21 -07:00
Sam Lantinga
947ad6e13a Added support for the Xbox Series X controller on iOS and tvOS 2021-07-12 17:57:21 -07:00
Dimitriy Ryazantcev
17ed8d8085 Added HIDAPI backend for Amazon Luna Controller Model T28B69 connected via Bluetooth LE (VID:0171, PID:0419).
To enter Bluetooth pairing mode hold B and Action (button with circle) buttons for 3 seconds.

It works via usual HIDAPI if special filter driver is not installed:
https://www.amazon.com/gp/help/customer/display.html?nodeId=GZCT4CTFHXLHEB9T

With that driver installed it mimics Xbox One controller and works via XInput under Windows.

Under DInput this controller is not usable at all.
2021-07-07 08:31:12 -07:00
Sam Lantinga
00d67620da Added the SteelSeries manufacturer to the Nimbus+ entry on macOS 2021-07-06 11:32:11 -07:00
Sam Lantinga
24e836b0db Added controller mapping for the Nimbus+ controller on macOS when MFi support is not available 2021-07-06 10:00:09 -07:00
Joshua Ashton
c90bd3bf79 Add missing PS5 DualSense GUIDs
Fixes my DualSense controller not being recognised as a SDL GameController which breaks Steam Input filtering causing SDL to fight for input.
2021-06-26 21:21:46 -07:00
Sam Lantinga
5042ab6f24 Added Linux and macOS mappings for the DirectInput mode of the Amazon Luna Controller 2021-06-24 18:09:06 -07:00
Sam Lantinga
99700a5c52 SDL: add Windows mappings for Luna controllers for USB DirectInput mode and BT. Note: the triggers do not seem to work in BT mode. 2021-06-24 18:09:01 -07:00
Sam Lantinga
afd100f02b Added support for the PowerA Fusion Pro 2 and the PDP Xbox Series X Afterglow and Blue controllers 2021-06-18 17:37:46 -07:00
Andrew Murray
cd67f42d8f
add Linux mapping for brook fighting board (#4416)
* added controller mapping for Brook fighting board

* fixed formatting on Brook Universal Fighting Board controller mapping entry
2021-06-04 09:20:47 -07:00
Sjoerd Simons
89fd9821de Add controller mapping for Atari vcs controllers
This add controller mappings for the Atari vcs (modern) controller as
well as the classic controller, for both bluetooth and USB connectivity.

Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2021-06-03 11:43:41 -07:00
Ryan C. Gordon
f4ab1c94f9
gamecontrollerdb: Add entry for the 8BitDo Receiver for Linux.
Fixes #3048.
2021-05-10 13:08:34 -04:00
Ryan C. Gordon
bedc509afc
gamecontrollerdb: added entry for PowerA XBox One Controller for Linux.
Fixes #3910.
2021-05-10 13:04:59 -04:00
Sam Lantinga
9231f1f1cf Added support for the PS5 controller on iOS and tvOS 2021-05-07 12:29:03 -07:00
Sam Lantinga
1aaafc2bd8 Show the real name of the Xbox controller when using the generic mapping on Linux 2021-04-13 16:29:46 -07:00
Sam Lantinga
4a07c73b80 Added mapping for the Amazon Luna controller on Linux 2021-03-26 13:53:58 -07:00
Sam Lantinga
07af9baa86 Use the correct name for the Amazon Luna Gamepad 2021-03-26 13:05:38 -07:00
Sam Lantinga
ef36355563 Added mapping for the Amazon Luna controller on macOS 2021-03-26 13:03:29 -07:00
Ivan Epifanov
e5cbe7cf7a Add l2/r2 axes, l3/r3 buttons. rumble and ledbar support for ds4 2021-03-08 09:07:12 -08:00
Ivan Epifanov
2d64e37e41 Initial rebase of xerpi's port 2021-03-08 09:07:12 -08:00
Sam Lantinga
1a17ab30e1 Added mappings for popular controllers on Chromebooks 2021-02-21 11:03:26 -08:00
Matt Borgerson
4aa2e74844 Add Xbox Controller S entry to gamecontrollerdb 2021-02-16 10:15:44 -08:00
soredake
39153f81b9 add Linux mapping for Ipega PG-9087S, closes #3783 2021-02-12 08:00:41 -08:00
Sam Lantinga
9130f7c377 Updated copyright for 2021 2021-01-02 10:25:38 -08:00
Sam Lantinga
f484abbdc8 Added Android mapping for the Xbox One Series X controller over Bluetooth 2020-12-15 14:57:51 -08:00
Alice Rowan
3835f2008d Fix Nyko Airflo Ex Windows mapping, add Linux/Mac mappings 2019-03-03 12:38:23 -07:00
Sam Lantinga
9980766533 Respect SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS for the Nintendo Switch Pro controller on Linux 2020-11-19 19:09:38 -08:00
Sam Lantinga
7366693f3b Added support for a few more controllers on Linux 2020-11-19 19:09:36 -08:00
Sam Lantinga
9f51fad361 Added support for the touchpad on PS4 and PS5 controllers 2020-11-13 18:01:29 -08:00
Sam Lantinga
8cd4f364db Mapped the touchpad click as SDL_CONTROLLER_BUTTON_MISC1 on the PS5 controller 2020-11-12 20:02:31 -08:00
Sam Lantinga
76bd6cd2d9 Fixed bug 5326 - Logitech Extreme 3D joystick is listed as gamepad in linux section of SDL_gamecontrollerdb.h
Spooky

For some reason the Logitech Extreme 3D joystick was added to SDL_gamecontrollerdb.h  in the linux section only.

This breaks the joystick in linux as it is not a gamepad.  I am unable to correctly use or map the Logitech Exteme 3D joystick in games that use SDL2 in linux.

Please remove Logitech Extreme 3D from SDL_gamecontrollerdb.h  Linux section.  It is a joystick not a gamepad.
2020-11-11 19:45:56 -08:00
Sam Lantinga
fb4a406af2 Don't put 'm' in the GUID for Xbox and PS4 controllers on iOS 2020-11-09 18:45:22 -08:00
Sam Lantinga
009b62f1c2 Be explicit about mapping the new game controller paddle buttons 2020-11-07 02:22:15 -08:00
Sam Lantinga
faeac6e86c Added additional game controller button support on iOS/tvOS 2020-11-06 16:42:46 -08:00
Sam Lantinga
3a3aaac221 Added 4 auxiliary buttons to the game controller API
Xbox Elite controllers use AUX1-AUX4 to represent the paddle buttons when using the HIDAPI driver
PS4 and PS5 controllers use AUX1 to represent the touchpad button
Nintendo Switch Pro controllers use AUX1 to represent the capture button
2020-11-06 11:30:52 -08:00
Sam Lantinga
bd2dd3f6bb Added Android mapping for the Sony PS5 Controller 2020-11-05 15:36:15 -08:00
Sam Lantinga
4d79f9662f Added initial support for the Sony PS5 Controller 2020-11-05 15:02:54 -08:00
Sam Lantinga
3755f6920f Added mapping for Xbox One S controller and PS4 controller on Android 11, including guide button 2020-10-16 12:40:10 -07:00
Sam Lantinga
2d7b33cb41 Added support for the controller home button on iOS 14 2020-10-13 21:08:11 -07:00
Sam Lantinga
45c644cc99 Added support for the MOGA XP5-X Plus 2020-09-28 21:19:45 -07:00
Sam Lantinga
aefe19ff08 Added support for the NACON Revolution Pro Controller 3 and the GameStop PS4 Fun Controller 2020-06-09 11:31:39 -07:00
Sam Lantinga
1e5dd06f83 Added support for the HORI Real Arcade Pro on Mac OSX and Linux 2020-05-06 12:19:58 -07:00
Sam Lantinga
11723411ab Added support for the Razer Kishi 2020-05-04 10:16:10 -07:00
Sam Lantinga
c6b24b4b7c Added support for the following controllers:
* 8BitDo N30 Pro 2
* 8BitDo SN30 Gamepad
* 8BitDo SN30 Pro+
* 8BitDo Zero 2
* SZMY-POWER PC Gamepad
* ThrustMaster eSwap PRO Controller
* ZEROPLUS P4 Wired Gamepad

In additional, all 8BitDo controllers use SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS to have the correct mapping based on user preferences.
2020-04-23 11:07:07 -07:00
Sam Lantinga
aba2792896 Added a Windows Gaming Input joystick driver
This driver supports the Razer Atrox Arcade Stick

Some of the quirks of this driver, inherent in Windows Gaming Input:
* There will never appear to be controllers connected at startup. You must support hot-plugging in order to see these controllers.
* You can't read the state of the guide button
* You can't get controller events in the background
2020-04-18 21:41:37 -07:00
Sam Lantinga
2be75c6a61 Fixed bug 5028 - Virtual Joysticks (new joystick backend)
David Ludwig

I have created a new driver for SDL's Joystick and Game-Controller subsystem: a Virtual driver.  This driver allows one to create a software-based joystick, which to SDL applications will look and react like a real joystick, but whose state can be set programmatically.  A primary use case for this is to help enable developers to add touch-screen joysticks to their apps.

The driver comes with a set of new, public APIs, with functions to attach and detach joysticks, set virtual-joystick state, and to determine if a joystick is a virtual-one.

Use of virtual joysticks goes as such:

1. Attach one or more virtual joysticks by calling SDL_JoystickAttachVirtual.  If successful, this returns the virtual-device's joystick-index.
2. Open the virtual joysticks (using indicies returned by SDL_JoystickAttachVirtual).
3. Call any of the SDL_JoystickSetVirtual* functions when joystick-state changes.  Please note that virtual-joystick state will only get applied on the next call to SDL_JoystickUpdate, or when pumping or polling for SDL events (via SDL_PumpEvents or SDL_PollEvent).


Here is a listing of the new, public APIs, at present and subject to change:

------------------------------------------------------------

/**
 * Attaches a new virtual joystick.
 * Returns the joystick's device index, or -1 if an error occurred.
 */
extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type, int naxes, int nballs, int nbuttons, int nhats);

/**
 * Detaches a virtual joystick
 * Returns 0 on success, or -1 if an error occurred.
 */
extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index);

/**
 * Indicates whether or not a virtual-joystick is at a given device index.
 */
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index);

/**
 * Set values on an opened, virtual-joystick's controls.
 * Returns 0 on success, -1 on error.
 */
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick * joystick, int axis, Sint16 value);
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualBall(SDL_Joystick * joystick, int ball, Sint16 xrel, Sint16 yrel);
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick * joystick, int button, Uint8 value);
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualHat(SDL_Joystick * joystick, int hat, Uint8 value);

------------------------------------------------------------

Miscellaneous notes on the initial patch, which are also subject to change:

1. no test code is present in SDL, yet.  This should, perhaps, change.  Initial development was done with an ImGui-based app, which potentially is too thick for use in SDL-official.  If tests are to be added, what kind of tests?  Automated?  Graphical?

2. virtual game controllers can be created by calling SDL_JoystickAttachVirtual with a joystick-type of SDL_JOYSTICK_TYPE_GAME_CONTROLLER, with naxes (num axes) set to SDL_CONTROLLER_AXIS_MAX, and with nbuttons (num buttons) set to SDL_CONTROLLER_BUTTON_MAX.  When updating their state, values of type SDL_GameControllerAxis or SDL_GameControllerButton can be casted to an int and used for the control-index (in calls to SDL_JoystickSetVirtual* functions).

3. virtual joysticks' guids are mostly all-zeros with the exception of the last two bytes, the first of which is a 'v', to indicate that the guid is a virtual one, and the second of which is a SDL_JoystickType that has been converted into a Uint8.

4. virtual joysticks are ONLY turned into virtual game-controllers if and when their joystick-type is set to SDL_JOYSTICK_TYPE_GAMECONTROLLER.  This is controlled by having SDL's default list of game-controllers have a single entry for a virtual game controller (of guid, "00000000000000000000000000007601", which is subject to the guid-encoding described above).

5. regarding having to call SDL_JoystickUpdate, either directly or indirectly via SDL_PumpEvents or SDL_PollEvents, before new virtual-joystick state becomes active (as specified via SDL_JoystickSetVirtual* function-calls), this was done to match behavior found in SDL's other joystick drivers, almost all of which will only update SDL-state during SDL_JoystickUpdate.

6. the initial patch is based off of SDL 2.0.12

7. the virtual joystick subsystem is disabled by default.  It should be possible to enable it by building with SDL_JOYSTICK_VIRTUAL=1



Questions, comments, suggestions, or bug reports very welcome!
2020-03-13 19:08:45 -07:00
Sam Lantinga
255c9c23d4 Fixed bug 4921 - Do not swap B/X buttons on GameCube controller unless it's requested
The binding for the Mayflash GameCube controller adapter now respects the SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS hint
2020-03-13 13:28:33 -07:00
Sam Lantinga
cb2f78b12d Updated 8BitDo SF30 Pro mapping with hint support, added Android binding for the 8BitDo M30 Gamepad 2020-03-13 13:05:38 -07:00
Sam Lantinga
db3b3a1d84 Added support for SDL hints in the game controller mapping database 2020-03-12 19:47:28 -07:00