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);
|
||||
|
||||
Reference in New Issue
Block a user