From 6ca20ad7ba594fd01c01e8d56e5e02d84609d9e1 Mon Sep 17 00:00:00 2001 From: David Marcec Date: Mon, 17 Jun 2019 08:17:26 +1000 Subject: Addressed issues --- src/core/hle/service/acc/acc.cpp | 17 +++++++++++------ src/core/hle/service/acc/acc.h | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'src/core/hle/service/acc') diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index f02f54f91..025714e5a 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -243,6 +243,8 @@ void Module::Interface::IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx if (nacp_unique != nullptr) { is_locked = nacp_unique->GetUserAccountSwitchLock(); + } else { + LOG_ERROR(Service_ACC, "nacp_unique is null!"); } } else { is_locked = nacp.GetUserAccountSwitchLock(); @@ -285,15 +287,18 @@ Module::Interface::Interface(std::shared_ptr module, Module::Interface::~Interface() = default; -void InstallInterfaces(SM::ServiceManager& service_manager) { +void InstallInterfaces(Core::System& system) { auto module = std::make_shared(); auto profile_manager = std::make_shared(); - Core::System& system = Core::System::GetInstance(); - std::make_shared(module, profile_manager, system)->InstallAsService(service_manager); - std::make_shared(module, profile_manager, system)->InstallAsService(service_manager); - std::make_shared(module, profile_manager, system)->InstallAsService(service_manager); - std::make_shared(module, profile_manager, system)->InstallAsService(service_manager); + std::make_shared(module, profile_manager, system) + ->InstallAsService(system.ServiceManager()); + std::make_shared(module, profile_manager, system) + ->InstallAsService(system.ServiceManager()); + std::make_shared(module, profile_manager, system) + ->InstallAsService(system.ServiceManager()); + std::make_shared(module, profile_manager, system) + ->InstallAsService(system.ServiceManager()); } } // namespace Service::Account diff --git a/src/core/hle/service/acc/acc.h b/src/core/hle/service/acc/acc.h index 47a7c46d7..350f123a0 100644 --- a/src/core/hle/service/acc/acc.h +++ b/src/core/hle/service/acc/acc.h @@ -39,6 +39,6 @@ public: }; /// Registers all ACC services with the specified service manager. -void InstallInterfaces(SM::ServiceManager& service_manager); +void InstallInterfaces(Core::System& system); } // namespace Service::Account -- cgit v1.2.3