mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-01-18 20:17:51 -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:
@@ -9,7 +9,7 @@
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "Detector.h"
|
||||
#include "DetectionManager.h"
|
||||
#include "LogManager.h"
|
||||
#include <hidapi.h>
|
||||
#include "MNTReformKeyboardController.h"
|
||||
@@ -31,13 +31,13 @@ void DetectMNTKeyboardControllers(hid_device_info *info, const std::string &name
|
||||
{
|
||||
MNTReformKeyboardController *controller = new MNTReformKeyboardController(dev, info->path);
|
||||
RGBController_MNTReformKeyboard *rgb_controller = new RGBController_MNTReformKeyboard(controller);
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
DetectionManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
else if(info->product_id == PID_KBD_POCKET_REFORM)
|
||||
{
|
||||
MNTPocketReformKeyboardController *controller = new MNTPocketReformKeyboardController(dev, info->path);
|
||||
RGBController_MNTPocketReformKeyboard *rgb_controller = new RGBController_MNTPocketReformKeyboard(controller);
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
DetectionManager::get()->RegisterRGBController(rgb_controller);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user