Split out detection system from ResourceManager into DetectionManager

* Split detection system out into its own class, DetectionManager
    * Clean up ResourceManger's many callbacks into just two, one for detection and one general purpose
This commit is contained in:
Adam Honse
2026-01-08 23:35:50 -06:00
parent 58582202cf
commit ad364871c6
224 changed files with 3161 additions and 2788 deletions

View File

@@ -10,7 +10,7 @@
#include <hidapi.h>
#include "CreativeSoundBlasterXG6Controller.h"
#include "RGBController_CreativeSoundBlasterXG6.h"
#include "Detector.h"
#include "DetectionManager.h"
/*-----------------------------------------------------*\
| Creative vendor ID |
@@ -30,7 +30,7 @@ void DetectCreativeDevice(hid_device_info* info, const std::string& name)
CreativeSoundBlasterXG6Controller* controller = new CreativeSoundBlasterXG6Controller(dev, info->path, name);
RGBController_CreativeSoundBlasterXG6* rgb_controller = new RGBController_CreativeSoundBlasterXG6(controller);
ResourceManager::get()->RegisterRGBController(rgb_controller);
DetectionManager::get()->RegisterRGBController(rgb_controller);
}
}

View File

@@ -7,7 +7,7 @@
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include "Detector.h"
#include "DetectionManager.h"
#include "CreativeSoundBlasterAE5Controller_Windows.h"
#include "RGBController_CreativeSoundBlasterAE5_Windows.h"
#include "LogManager.h"
@@ -22,7 +22,7 @@ void DetectCreativeAE5Device()
{
LOG_INFO("[Creative SoundBlaster AE-5] Device initialized successfully, registering controller");
RGBController_CreativeSoundBlasterAE5* rgb_controller = new RGBController_CreativeSoundBlasterAE5(controller);
ResourceManager::get()->RegisterRGBController(rgb_controller);
DetectionManager::get()->RegisterRGBController(rgb_controller);
}
else
{
@@ -31,4 +31,4 @@ void DetectCreativeAE5Device()
}
}
REGISTER_DETECTOR("Creative SoundBlaster AE-5", DetectCreativeAE5Device);
REGISTER_DETECTOR("Creative SoundBlaster AE-5", DetectCreativeAE5Device);