Add GetModule() helper functions, for HID, CAM, and CFG

This commit is contained in:
B3n30
2018-10-12 11:50:50 +02:00
parent 1b1de23a98
commit eb3af0f16a
12 changed files with 49 additions and 51 deletions

View File

@@ -1052,6 +1052,13 @@ void Module::LoadCameraImplementation(CameraConfig& camera, int camera_id) {
camera.impl->SetResolution(camera.contexts[0].resolution);
}
std::shared_ptr<Module> GetModule(Core::System& system) {
auto cam = system.ServiceManager().GetService<Service::CAM::Module::Interface>("cam:u");
if (!cam)
return nullptr;
return cam->GetModule();
}
void InstallInterfaces(Core::System& system) {
auto& service_manager = system.ServiceManager();
auto cam = std::make_shared<Module>();

View File

@@ -785,6 +785,8 @@ private:
std::atomic<bool> is_camera_reload_pending{false};
};
std::shared_ptr<Module> GetModule(Core::System& system);
void InstallInterfaces(Core::System& system);
} // namespace Service::CAM