From f4b242328ddcf841b2556ef3eb3fae2c316a2e75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atome=20=E2=80=9CAtom=E2=80=9D=20Art?= Date: Thu, 6 Mar 2025 19:31:51 +0000 Subject: [PATCH] Add Sony Playstation DualSense Edge PID --- .../SonyGamepadController/SonyGamepadControllerDetect.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Controllers/SonyGamepadController/SonyGamepadControllerDetect.cpp b/Controllers/SonyGamepadController/SonyGamepadControllerDetect.cpp index d9f0bbf5..98c58bb1 100644 --- a/Controllers/SonyGamepadController/SonyGamepadControllerDetect.cpp +++ b/Controllers/SonyGamepadController/SonyGamepadControllerDetect.cpp @@ -5,6 +5,7 @@ | | | Pol Rius (alpemwarrior) 24 Sep 2020 | | Flora Aubry 01 Jul 2022 | +| Yoan Berthelot 06 Mar 2025 | | | | This file is part of the OpenRGB project | | SPDX-License-Identifier: GPL-2.0-only | @@ -22,6 +23,7 @@ #define SONY_DS4_V2_PID 0x09CC #define SONY_DS4_RECEIVER_PID 0x0BA0 #define SONY_DUALSENSE_PID 0x0CE6 +#define SONY_DUALSENSE_EDGE_PID 0x0DF2 void DetectSonyDS4Controllers(hid_device_info* info, const std::string&) { @@ -35,7 +37,7 @@ void DetectSonyDS4Controllers(hid_device_info* info, const std::string&) } } -void DetectSonyDualSenseControllers(hid_device_info* info, const std::string&) +void DetectSonyDualSenseControllers(hid_device_info* info, const std::string& name) { hid_device* dev = hid_open_path(info->path); if(dev) @@ -43,7 +45,7 @@ void DetectSonyDualSenseControllers(hid_device_info* info, const std::string&) bool is_bluetooth = info->interface_number == -1; SonyDualSenseController* controller = new SonyDualSenseController(dev, info->path, is_bluetooth); RGBController_SonyDualSense* rgb_controller = new RGBController_SonyDualSense(controller); - // Constructor sets the name + rgb_controller->name = name; ResourceManager::get()->RegisterRGBController(rgb_controller); } } @@ -52,3 +54,4 @@ REGISTER_HID_DETECTOR("Sony DualShock 4", DetectSonyDS4Controllers, SONY_V REGISTER_HID_DETECTOR("Sony DualShock 4", DetectSonyDS4Controllers, SONY_VID, SONY_DS4_V2_PID); REGISTER_HID_DETECTOR("Sony DualShock 4", DetectSonyDS4Controllers, SONY_VID, SONY_DS4_RECEIVER_PID); REGISTER_HID_DETECTOR("Sony DualSense", DetectSonyDualSenseControllers, SONY_VID, SONY_DUALSENSE_PID); +REGISTER_HID_DETECTOR("Sony DualSense Edge", DetectSonyDualSenseControllers, SONY_VID, SONY_DUALSENSE_EDGE_PID); \ No newline at end of file