Ryujinx-SDL/src/joystick
Sam Lantinga cab1a715f5 Fixed bug 5233 - PS3 Gamepad Motion Control not correctly ignored on Linux
Igor Morgado

PS3 Controller motion sensor string is being reported as

`Gasia Co.,Ltd PS(R) Gamepad Motion Sensors`

But `src/joystick/SDL_gamecontroller.c` line1690 only ignores if matches the string  `Controller Motion Sensors`.

```
#if defined(__LINUX__)
    if (name && SDL_strstr(name, "Controller Motion Sensors")) {
        /* Don't treat the PS3 and PS4 motion controls as a separate game controller */
        return SDL_TRUE;
    }
#endif
```

Therefore, SDL is mapping 2 Game controllers instead one.

Maybe reduce the substring to match `Motion Sensors` instead.


A simple log from my application is shown below:

INFO: Game controller device 0 - PS3 Controller:PS3 Controller found.
INFO: Controller 0: Player 0: 054c:0268:8111 - PS3 Controller - PS3 Controller - Gasia Co.,Ltd PS(R) Gamepad
INFO: Game controller device 1 - PS3 Controller:PS3 Controller found.
INFO: Controller 1: Player 1: 054c:0268:8111 - PS3 Controller - PS3 Controller - Gasia Co.,Ltd PS(R) Gamepad Motion Sensors
2020-07-15 10:15:52 -07:00
..
android Fixed bug 5161 - Autodetect controller mappings based on the Linux Gamepad Specification 2020-05-29 13:37:21 -07:00
bsd Fixed bug 5161 - Autodetect controller mappings based on the Linux Gamepad Specification 2020-05-29 13:37:21 -07:00
darwin Fixed bug 5161 - Autodetect controller mappings based on the Linux Gamepad Specification 2020-05-29 13:37:21 -07:00
dummy Fixed bug 5161 - Autodetect controller mappings based on the Linux Gamepad Specification 2020-05-29 13:37:21 -07:00
emscripten Fixed bug 5161 - Autodetect controller mappings based on the Linux Gamepad Specification 2020-05-29 13:37:21 -07:00
haiku Fixed bug 5161 - Autodetect controller mappings based on the Linux Gamepad Specification 2020-05-29 13:37:21 -07:00
hidapi Fixed bug 5155 - HIDAPI_JoystickDisconnected incorrect array shift 2020-05-29 21:22:11 -07:00
iphoneos Fixed bug 5161 - Autodetect controller mappings based on the Linux Gamepad Specification 2020-05-29 13:37:21 -07:00
linux joystick: Linux joysticks now recover better from dropped events. 2020-06-28 16:23:05 -04:00
psp Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
steam Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
virtual Fixed bug 5161 - Autodetect controller mappings based on the Linux Gamepad Specification 2020-05-29 13:37:21 -07:00
windows cmake: Fix building with -DSDL_HAPTIC=Off 2020-07-08 17:28:34 +02:00
check_8bitdo.sh Fixed running on older versions of iOS 2020-04-27 13:31:10 -07:00
controller_type.h Fixed build 2020-06-09 10:47:29 -07:00
SDL_gamecontroller.c Fixed bug 5233 - PS3 Gamepad Motion Control not correctly ignored on Linux 2020-07-15 10:15:52 -07:00
SDL_gamecontrollerdb.h Added support for the NACON Revolution Pro Controller 3 and the GameStop PS4 Fun Controller 2020-06-09 11:31:39 -07:00
SDL_joystick_c.h Fixed bug 5161 - Autodetect controller mappings based on the Linux Gamepad Specification 2020-05-29 13:37:21 -07:00
SDL_joystick.c Fixed bug 5161 - Autodetect controller mappings based on the Linux Gamepad Specification 2020-05-29 13:37:21 -07:00
SDL_sysjoystick.h Fixed bug 5161 - Autodetect controller mappings based on the Linux Gamepad Specification 2020-05-29 13:37:21 -07:00
sort_controllers.py Added support for SDL hints in the game controller mapping database 2020-03-12 19:47:28 -07:00
usb_ids.h Added support for the Razer Atrox Arcade Stick 2020-04-17 21:30:58 -07:00