mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-12 05:40:04 +00:00
Add GetModule() helper functions, for HID, CAM, and CFG
This commit is contained in:
parent
1b1de23a98
commit
eb3af0f16a
12 changed files with 49 additions and 51 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue