mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-11-09 09:54:53 +00:00
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
|
||
|---|---|---|
| .. | ||
| atomic | ||
| audio | ||
| core | ||
| cpuinfo | ||
| dynapi | ||
| events | ||
| file | ||
| filesystem | ||
| haptic | ||
| hidapi | ||
| joystick | ||
| libm | ||
| loadso | ||
| locale | ||
| main | ||
| power | ||
| render | ||
| sensor | ||
| stdlib | ||
| test | ||
| thread | ||
| timer | ||
| video | ||
| SDL.c | ||
| SDL_assert.c | ||
| SDL_assert_c.h | ||
| SDL_dataqueue.c | ||
| SDL_dataqueue.h | ||
| SDL_error.c | ||
| SDL_error_c.h | ||
| SDL_hints.c | ||
| SDL_hints_c.h | ||
| SDL_internal.h | ||
| SDL_log.c | ||