mirror of
https://github.com/libsdl-org/SDL.git
synced 2024-11-30 23:33:42 +08:00
Fixed the PS4 motion controls showing up as a separate game controller on Linux
This commit is contained in:
parent
69c256c102
commit
db320e460a
0
Android.mk
Normal file → Executable file
0
Android.mk
Normal file → Executable file
@ -1466,6 +1466,13 @@ SDL_bool SDL_ShouldIgnoreGameController(const char *name, SDL_JoystickGUID guid)
|
||||
Uint16 version;
|
||||
Uint32 vidpid;
|
||||
|
||||
#if defined(__LINUX__)
|
||||
if (name && SDL_strcmp(name, "Sony Interactive Entertainment Wireless Controller Motion Sensors") == 0) {
|
||||
/* Don't treat the PS4 motion controls as a separate game controller */
|
||||
return SDL_TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (SDL_allowed_controllers.num_entries == 0 &&
|
||||
SDL_ignored_controllers.num_entries == 0) {
|
||||
return SDL_FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user