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
|
@ -390,6 +390,13 @@ void Module::ReloadInputDevices() {
|
|||
is_device_reload_pending.store(true);
|
||||
}
|
||||
|
||||
std::shared_ptr<Module> GetModule(Core::System& system) {
|
||||
auto hid = system.ServiceManager().GetService<Service::HID::Module::Interface>("hid:USER");
|
||||
if (!hid)
|
||||
return nullptr;
|
||||
return hid->GetModule();
|
||||
}
|
||||
|
||||
void InstallInterfaces(Core::System& system) {
|
||||
auto& service_manager = system.ServiceManager();
|
||||
auto hid = std::make_shared<Module>(system);
|
||||
|
|
|
@ -337,5 +337,7 @@ private:
|
|||
std::unique_ptr<Input::TouchDevice> touch_device;
|
||||
};
|
||||
|
||||
std::shared_ptr<Module> GetModule(Core::System& system);
|
||||
|
||||
void InstallInterfaces(Core::System& system);
|
||||
} // namespace Service::HID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue