mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-13 06:10:04 +00:00
Add GetModule() helper functions, for HID, CAM, and CFG
This commit is contained in:
parent
1b1de23a98
commit
eb3af0f16a
12 changed files with 49 additions and 51 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue