From 179bd66581aefb6e92f9aafb99440b6dc88f2960 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 23 Nov 2020 18:27:43 -0800 Subject: [PATCH] Don't enable PS5 controller support if DS4Windows is running - they conflict. --- src/joystick/SDL_joystick.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/joystick/SDL_joystick.c b/src/joystick/SDL_joystick.c index c9560f5a4..bb46c099b 100644 --- a/src/joystick/SDL_joystick.c +++ b/src/joystick/SDL_joystick.c @@ -2220,6 +2220,7 @@ SDL_bool SDL_ShouldIgnoreJoystick(const char *name, SDL_JoystickGUID guid) Uint32 id; Uint16 vendor; Uint16 product; + SDL_GameControllerType type; SDL_GetJoystickGUIDInfo(guid, &vendor, &product, NULL); @@ -2231,7 +2232,8 @@ SDL_bool SDL_ShouldIgnoreJoystick(const char *name, SDL_JoystickGUID guid) } } - if (SDL_GetJoystickGameControllerType(name, vendor, product, -1, 0, 0, 0) == SDL_CONTROLLER_TYPE_PS4 && SDL_IsPS4RemapperRunning()) { + type = SDL_GetJoystickGameControllerType(name, vendor, product, -1, 0, 0, 0); + if ((type == SDL_CONTROLLER_TYPE_PS4 || type == SDL_CONTROLLER_TYPE_PS5) && SDL_IsPS4RemapperRunning()) { return SDL_TRUE; }