mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-01-29 17:31:08 -05:00
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:
@@ -7,7 +7,7 @@
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "Detector.h"
|
||||
#include "DetectionManager.h"
|
||||
#include "MadCatzCyborgController.h"
|
||||
#include "RGBController_MadCatzCyborg.h"
|
||||
#include <hidapi.h>
|
||||
@@ -29,15 +29,15 @@
|
||||
void DetectMadCatzCyborgControllers(hid_device_info* info, const std::string& /*name*/)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
|
||||
if(dev)
|
||||
{
|
||||
MadCatzCyborgController* controller = new MadCatzCyborgController(dev, info->path);
|
||||
controller->Initialize();
|
||||
|
||||
|
||||
RGBController_MadCatzCyborg* rgb_controller = new RGBController_MadCatzCyborg(controller);
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
|
||||
DetectionManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user