From 2147291c5240cbbd06fc7f10ba6b447f0655f12d Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Thu, 6 Aug 2026 00:01:52 -0500 Subject: [PATCH] Split detector file for Alienware monitors and organize into folders --- .../AlienwareAW3423DWFController.cpp | 0 .../AlienwareAW3423DWFController.h | 0 .../AlienwareAW3423DWFControllerDetect.cpp | 47 +++++++++++++++++++ .../RGBController_AlienwareAW3423DWF.cpp | 0 .../RGBController_AlienwareAW3423DWF.h | 0 .../AlienwareMonitorController.cpp | 0 .../AlienwareMonitorController.h | 0 .../AlienwareMonitorControllerDetect.cpp | 22 --------- .../RGBController_AlienwareMonitor.cpp | 0 .../RGBController_AlienwareMonitor.h | 0 10 files changed, 47 insertions(+), 22 deletions(-) rename Controllers/AlienwareMonitorController/{ => AlienwareAW3423DWFController}/AlienwareAW3423DWFController.cpp (100%) rename Controllers/AlienwareMonitorController/{ => AlienwareAW3423DWFController}/AlienwareAW3423DWFController.h (100%) create mode 100644 Controllers/AlienwareMonitorController/AlienwareAW3423DWFController/AlienwareAW3423DWFControllerDetect.cpp rename Controllers/AlienwareMonitorController/{ => AlienwareAW3423DWFController}/RGBController_AlienwareAW3423DWF.cpp (100%) rename Controllers/AlienwareMonitorController/{ => AlienwareAW3423DWFController}/RGBController_AlienwareAW3423DWF.h (100%) rename Controllers/AlienwareMonitorController/{ => AlienwareMonitorController}/AlienwareMonitorController.cpp (100%) rename Controllers/AlienwareMonitorController/{ => AlienwareMonitorController}/AlienwareMonitorController.h (100%) rename Controllers/AlienwareMonitorController/{ => AlienwareMonitorController}/AlienwareMonitorControllerDetect.cpp (71%) rename Controllers/AlienwareMonitorController/{ => AlienwareMonitorController}/RGBController_AlienwareMonitor.cpp (100%) rename Controllers/AlienwareMonitorController/{ => AlienwareMonitorController}/RGBController_AlienwareMonitor.h (100%) diff --git a/Controllers/AlienwareMonitorController/AlienwareAW3423DWFController.cpp b/Controllers/AlienwareMonitorController/AlienwareAW3423DWFController/AlienwareAW3423DWFController.cpp similarity index 100% rename from Controllers/AlienwareMonitorController/AlienwareAW3423DWFController.cpp rename to Controllers/AlienwareMonitorController/AlienwareAW3423DWFController/AlienwareAW3423DWFController.cpp diff --git a/Controllers/AlienwareMonitorController/AlienwareAW3423DWFController.h b/Controllers/AlienwareMonitorController/AlienwareAW3423DWFController/AlienwareAW3423DWFController.h similarity index 100% rename from Controllers/AlienwareMonitorController/AlienwareAW3423DWFController.h rename to Controllers/AlienwareMonitorController/AlienwareAW3423DWFController/AlienwareAW3423DWFController.h diff --git a/Controllers/AlienwareMonitorController/AlienwareAW3423DWFController/AlienwareAW3423DWFControllerDetect.cpp b/Controllers/AlienwareMonitorController/AlienwareAW3423DWFController/AlienwareAW3423DWFControllerDetect.cpp new file mode 100644 index 000000000..212aba717 --- /dev/null +++ b/Controllers/AlienwareMonitorController/AlienwareAW3423DWFController/AlienwareAW3423DWFControllerDetect.cpp @@ -0,0 +1,47 @@ +/*---------------------------------------------------------*\ +| AlienwareAW3423DWFControllerDetect.cpp | +| | +| Detector for Alienware AW3423DWF monitor | +| | +| Ferréol DUBOIS COLI (Fefe_du_973) 23 Jan 2025 | +| | +| This file is part of the OpenRGB project | +| SPDX-License-Identifier: GPL-2.0-or-later | +\*---------------------------------------------------------*/ + +#include +#include "AlienwareAW3423DWFController.h" +#include "DetectionManager.h" +#include "RGBController_AlienwareAW3423DWF.h" + +/*---------------------------------------------------------*\ +| Alienware Vendor ID | +\*---------------------------------------------------------*/ +#define ALIENWARE_VID 0x187C + +/*---------------------------------------------------------*\ +| Alienware Vendor ID | +\*---------------------------------------------------------*/ +#define ALIENWARE_AW3423DWF_PID 0x100E +#define ALIENWARE_USAGE_PAGE 0xFFDA +#define ALIENWARE_USAGE 0x00DA + +DetectedControllers DetectAlienwareAW3423DWFControllers(hid_device_info* info, const std::string&) +{ + DetectedControllers detected_controllers; + hid_device* dev; + + dev = hid_open_path(info->path); + + if(dev) + { + AlienwareAW3423DWFController* controller = new AlienwareAW3423DWFController(dev, info->path); + RGBController_AlienwareAW3423DWF* rgb_controller = new RGBController_AlienwareAW3423DWF(controller); + + detected_controllers.push_back(rgb_controller); + } + + return(detected_controllers); +} + +REGISTER_HID_DETECTOR("Alienware AW3423DWF", DetectAlienwareAW3423DWFControllers, ALIENWARE_VID, ALIENWARE_AW3423DWF_PID); diff --git a/Controllers/AlienwareMonitorController/RGBController_AlienwareAW3423DWF.cpp b/Controllers/AlienwareMonitorController/AlienwareAW3423DWFController/RGBController_AlienwareAW3423DWF.cpp similarity index 100% rename from Controllers/AlienwareMonitorController/RGBController_AlienwareAW3423DWF.cpp rename to Controllers/AlienwareMonitorController/AlienwareAW3423DWFController/RGBController_AlienwareAW3423DWF.cpp diff --git a/Controllers/AlienwareMonitorController/RGBController_AlienwareAW3423DWF.h b/Controllers/AlienwareMonitorController/AlienwareAW3423DWFController/RGBController_AlienwareAW3423DWF.h similarity index 100% rename from Controllers/AlienwareMonitorController/RGBController_AlienwareAW3423DWF.h rename to Controllers/AlienwareMonitorController/AlienwareAW3423DWFController/RGBController_AlienwareAW3423DWF.h diff --git a/Controllers/AlienwareMonitorController/AlienwareMonitorController.cpp b/Controllers/AlienwareMonitorController/AlienwareMonitorController/AlienwareMonitorController.cpp similarity index 100% rename from Controllers/AlienwareMonitorController/AlienwareMonitorController.cpp rename to Controllers/AlienwareMonitorController/AlienwareMonitorController/AlienwareMonitorController.cpp diff --git a/Controllers/AlienwareMonitorController/AlienwareMonitorController.h b/Controllers/AlienwareMonitorController/AlienwareMonitorController/AlienwareMonitorController.h similarity index 100% rename from Controllers/AlienwareMonitorController/AlienwareMonitorController.h rename to Controllers/AlienwareMonitorController/AlienwareMonitorController/AlienwareMonitorController.h diff --git a/Controllers/AlienwareMonitorController/AlienwareMonitorControllerDetect.cpp b/Controllers/AlienwareMonitorController/AlienwareMonitorController/AlienwareMonitorControllerDetect.cpp similarity index 71% rename from Controllers/AlienwareMonitorController/AlienwareMonitorControllerDetect.cpp rename to Controllers/AlienwareMonitorController/AlienwareMonitorController/AlienwareMonitorControllerDetect.cpp index 4d40964be..4ed8cd54b 100644 --- a/Controllers/AlienwareMonitorController/AlienwareMonitorControllerDetect.cpp +++ b/Controllers/AlienwareMonitorController/AlienwareMonitorController/AlienwareMonitorControllerDetect.cpp @@ -10,10 +10,8 @@ \*---------------------------------------------------------*/ #include -#include "AlienwareAW3423DWFController.h" #include "AlienwareMonitorController.h" #include "DetectionManager.h" -#include "RGBController_AlienwareAW3423DWF.h" #include "RGBController_AlienwareMonitor.h" /*---------------------------------------------------------*\ @@ -24,29 +22,10 @@ /*---------------------------------------------------------*\ | Alienware Vendor ID | \*---------------------------------------------------------*/ -#define ALIENWARE_AW3423DWF_PID 0x100E #define ALIENWARE_AW3225QF_PID 0x1013 #define ALIENWARE_USAGE_PAGE 0xFFDA #define ALIENWARE_USAGE 0x00DA -DetectedControllers DetectAlienwareAW3423DWFControllers(hid_device_info* info, const std::string&) -{ - DetectedControllers detected_controllers; - hid_device* dev; - - dev = hid_open_path(info->path); - - if(dev) - { - AlienwareAW3423DWFController* controller = new AlienwareAW3423DWFController(dev, info->path); - RGBController_AlienwareAW3423DWF* rgb_controller = new RGBController_AlienwareAW3423DWF(controller); - - detected_controllers.push_back(rgb_controller); - } - - return(detected_controllers); -} - DetectedControllers DetectAlienwareMonitorControllers(hid_device_info* info, const std::string& name) { DetectedControllers detected_controllers; @@ -65,5 +44,4 @@ DetectedControllers DetectAlienwareMonitorControllers(hid_device_info* info, con return(detected_controllers); } -REGISTER_HID_DETECTOR("Alienware AW3423DWF", DetectAlienwareAW3423DWFControllers, ALIENWARE_VID, ALIENWARE_AW3423DWF_PID); REGISTER_HID_DETECTOR("Alienware AW3225QF", DetectAlienwareMonitorControllers, ALIENWARE_VID, ALIENWARE_AW3225QF_PID); diff --git a/Controllers/AlienwareMonitorController/RGBController_AlienwareMonitor.cpp b/Controllers/AlienwareMonitorController/AlienwareMonitorController/RGBController_AlienwareMonitor.cpp similarity index 100% rename from Controllers/AlienwareMonitorController/RGBController_AlienwareMonitor.cpp rename to Controllers/AlienwareMonitorController/AlienwareMonitorController/RGBController_AlienwareMonitor.cpp diff --git a/Controllers/AlienwareMonitorController/RGBController_AlienwareMonitor.h b/Controllers/AlienwareMonitorController/AlienwareMonitorController/RGBController_AlienwareMonitor.h similarity index 100% rename from Controllers/AlienwareMonitorController/RGBController_AlienwareMonitor.h rename to Controllers/AlienwareMonitorController/AlienwareMonitorController/RGBController_AlienwareMonitor.h