# SDL: Fixed HIDAPI PS4 controller being picked up when running under Steam

**URL:** <https://discourse.libsdl.org/t/sdl-fixed-hidapi-ps4-controller-being-picked-up-when-running-under-steam/36332>\
**Category:** SDL Commits\
**Created:** [May 19, 2022, 11:52pm UTC](https://discourse.libsdl.org/t/sdl-fixed-hidapi-ps4-controller-being-picked-up-when-running-under-steam/36332 "2022-05-19T23:52:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SDLPushPostBot](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/sdlpushpostbot/32/4370_2.png) [@SDLPushPostBot](https://discourse.libsdl.org/u/SDLPushPostBot)\
**Post date:** [May 19, 2022, 11:52pm UTC](https://discourse.libsdl.org/t/sdl-fixed-hidapi-ps4-controller-being-picked-up-when-running-under-steam/36332/1 "2022-05-19T23:52:02Z")

</div>

> <https://github.com/libsdl-org/SDL/commit/b1cf3229718a3e462608709254711c611dfab805>
>
> Input with PS4 configuration enabled

```diff
From b1cf3229718a3e462608709254711c611dfab805 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 19 May 2022 16:49:47 -0700
Subject: [PATCH] Fixed HIDAPI PS4 controller being picked up when running
 under Steam Input with PS4 configuration enabled

---
 src/joystick/SDL_joystick.c | 3 +--
 src/joystick/hidapi/SDL_hidapijoystick.c | 8 +-------
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c
index 387777fb69a..5288c552a41 100644
--- a/src/joystick/SDL_joystick.c
+++ b/src/joystick/SDL_joystick.c
@@ -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;
     }
 
diff --git a/src/joystick/hidapi/SDL_hidapijoystick.c b/src/joystick/hidapi/SDL_hidapijoystick.c
index 34542f92a04..a72e6a2cd72 100644
--- a/src/joystick/hidapi/SDL_hidapijoystick.c
+++ b/src/joystick/hidapi/SDL_hidapijoystick.c
@@ -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;
     }
 

```
