Use RGBControllerInterface for plugin API

This commit is contained in:
Adam Honse
2026-05-16 16:54:49 -05:00
parent c11090a4cf
commit ce4d2b1d78
27 changed files with 1393 additions and 1031 deletions

View File

@@ -321,9 +321,14 @@ ProfileManager* ResourceManager::GetProfileManager()
return(profile_manager);
}
std::vector<RGBController*> & ResourceManager::GetRGBControllers()
std::vector<RGBController*>& ResourceManager::GetRGBControllers()
{
return rgb_controllers;
return(rgb_controllers);
}
std::vector<RGBControllerInterface*>& ResourceManager::GetRGBControllerInterfaces()
{
return(rgb_controller_interfaces);
}
NetworkServer* ResourceManager::GetServer()
@@ -546,6 +551,7 @@ void ResourceManager::UpdateDeviceList()
| Clear the controller list |
\*-----------------------------------------------------*/
rgb_controllers.clear();
rgb_controller_interfaces.clear();
/*-----------------------------------------------------*\
| Insert hardware controllers into controller list |
@@ -606,6 +612,16 @@ void ResourceManager::UpdateDeviceList()
}
}
/*-----------------------------------------------------*\
| Synchronize interfaces with controllers |
\*-----------------------------------------------------*/
rgb_controller_interfaces.reserve(rgb_controllers.size());
for(RGBController* rgb_controller : rgb_controllers)
{
rgb_controller_interfaces.push_back((RGBControllerInterface*)rgb_controller);
}
/*-----------------------------------------------------*\
| Signal list has changed |
\*-----------------------------------------------------*/