Skip to content

Commit

Permalink
Fixed HIDAPI PS4 controller being picked up when running under Steam
Browse files Browse the repository at this point in the history
Input with PS4 configuration enabled
  • Loading branch information
slouken committed May 19, 2022
1 parent 83ae1b4 commit b1cf322
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
3 changes: 1 addition & 2 deletions src/joystick/SDL_joystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -2562,8 +2562,7 @@ SDL_bool SDL_ShouldIgnoreJoystick(const char *name, SDL_JoystickGUID guid)
return SDL_TRUE;
}

if (SDL_IsGameControllerNameAndGUID(name, guid) &&
SDL_ShouldIgnoreGameController(name, guid)) {
if (SDL_ShouldIgnoreGameController(name, guid)) {
return SDL_TRUE;
}

Expand Down
8 changes: 1 addition & 7 deletions src/joystick/hidapi/SDL_hidapijoystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,8 @@ HIDAPI_GetDeviceDriver(SDL_HIDAPI_Device *device)
const Uint16 USAGE_MULTIAXISCONTROLLER = 0x0008;
int i;
SDL_GameControllerType type;
SDL_JoystickGUID check_guid;

/* Make sure we have a generic GUID here, otherwise if we pass a HIDAPI
guid, this call will create a game controller mapping for the device.
*/
check_guid = device->guid;
check_guid.data[14] = 0;
if (SDL_ShouldIgnoreJoystick(device->name, check_guid)) {
if (SDL_ShouldIgnoreJoystick(device->name, device->guid)) {
return NULL;
}

Expand Down

0 comments on commit b1cf322

Please sign in to comment.