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