Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed the PS4 motion controls showing up as a separate game controlle…
…r on Linux
  • Loading branch information
slouken committed Dec 4, 2018
1 parent 69c256c commit db320e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Empty file modified Android.mk 100644 → 100755
Empty file.
7 changes: 7 additions & 0 deletions src/joystick/SDL_gamecontroller.c
Expand Up @@ -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;
Expand Down

0 comments on commit db320e4

Please sign in to comment.