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

View file

@ -144,13 +144,9 @@ void AppLoader_NCCH::ParseRegionLockoutInfo() {
}
region_lockout >>= 1;
}
auto cfg = Core::System::GetInstance()
.ServiceManager()
.GetService<Service::CFG::Module::Interface>("cfg:u");
ASSERT_MSG(cfg, "cfg:u not started!");
auto cfg_module = cfg->GetModule();
ASSERT_MSG(cfg_module, "CFG Module missing!");
cfg_module->SetPreferredRegionCodes(regions);
auto cfg = Service::CFG::GetModule(Core::System::GetInstance());
ASSERT_MSG(cfg, "CFG Module missing!");
cfg->SetPreferredRegionCodes(regions);
}
}