Add GetModule() helper functions, for HID, CAM, and CFG
This commit is contained in:
@@ -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>();
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user