Add GetModule() helper functions, for HID, CAM, and CFG

This commit is contained in:
B3n30
2018-10-12 11:50:50 +02:00
parent 1b1de23a98
commit eb3af0f16a
12 changed files with 49 additions and 51 deletions
+7
View File
@@ -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);