Add GetModule() helper functions, for HID, CAM, and CFG
This commit is contained in:
@@ -137,7 +137,7 @@ void Module::Interface::GetCountryCodeString(Kernel::HLERequestContext& ctx) {
|
||||
rb.Push<u32>(country_codes[country_code_id]);
|
||||
}
|
||||
|
||||
std::shared_ptr<Module> Module::Interface::GetModule() const {
|
||||
std::shared_ptr<Module> Module::Interface::Interface::GetModule() const {
|
||||
return cfg;
|
||||
}
|
||||
|
||||
@@ -718,6 +718,13 @@ u64 Module::GetConsoleUniqueId() {
|
||||
return console_id_le;
|
||||
}
|
||||
|
||||
std::shared_ptr<Module> GetModule(Core::System& system) {
|
||||
auto cfg = system.ServiceManager().GetService<Service::CFG::Module::Interface>("cfg:u");
|
||||
if (!cfg)
|
||||
return nullptr;
|
||||
return cfg->GetModule();
|
||||
}
|
||||
|
||||
void InstallInterfaces(Core::System& system) {
|
||||
auto& service_manager = system.ServiceManager();
|
||||
auto cfg = std::make_shared<Module>();
|
||||
|
@@ -411,6 +411,8 @@ private:
|
||||
u32 preferred_region_code = 0;
|
||||
};
|
||||
|
||||
std::shared_ptr<Module> GetModule(Core::System& system);
|
||||
|
||||
void InstallInterfaces(Core::System& system);
|
||||
|
||||
} // namespace Service::CFG
|
||||
|
Reference in New Issue
Block a user