summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/file_sys/control_metadata.cpp2
-rw-r--r--src/core/hle/service/acc/acc.cpp17
-rw-r--r--src/core/hle/service/acc/acc.h2
-rw-r--r--src/core/hle/service/service.cpp2
4 files changed, 14 insertions, 9 deletions
diff --git a/src/core/file_sys/control_metadata.cpp b/src/core/file_sys/control_metadata.cpp
index 735526b1c..f155a1341 100644
--- a/src/core/file_sys/control_metadata.cpp
+++ b/src/core/file_sys/control_metadata.cpp
@@ -88,7 +88,7 @@ u64 NACP::GetDefaultJournalSaveSize() const {
88} 88}
89 89
90bool NACP::GetUserAccountSwitchLock() const { 90bool NACP::GetUserAccountSwitchLock() const {
91 return raw.user_account_switch_lock == 1; 91 return raw.user_account_switch_lock != 0;
92} 92}
93 93
94u32 NACP::GetSupportedLanguages() const { 94u32 NACP::GetSupportedLanguages() const {
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
243 243
244 if (nacp_unique != nullptr) { 244 if (nacp_unique != nullptr) {
245 is_locked = nacp_unique->GetUserAccountSwitchLock(); 245 is_locked = nacp_unique->GetUserAccountSwitchLock();
246 } else {
247 LOG_ERROR(Service_ACC, "nacp_unique is null!");
246 } 248 }
247 } else { 249 } else {
248 is_locked = nacp.GetUserAccountSwitchLock(); 250 is_locked = nacp.GetUserAccountSwitchLock();
@@ -285,15 +287,18 @@ Module::Interface::Interface(std::shared_ptr<Module> module,
285 287
286Module::Interface::~Interface() = default; 288Module::Interface::~Interface() = default;
287 289
288void InstallInterfaces(SM::ServiceManager& service_manager) { 290void InstallInterfaces(Core::System& system) {
289 auto module = std::make_shared<Module>(); 291 auto module = std::make_shared<Module>();
290 auto profile_manager = std::make_shared<ProfileManager>(); 292 auto profile_manager = std::make_shared<ProfileManager>();
291 Core::System& system = Core::System::GetInstance();
292 293
293 std::make_shared<ACC_AA>(module, profile_manager, system)->InstallAsService(service_manager); 294 std::make_shared<ACC_AA>(module, profile_manager, system)
294 std::make_shared<ACC_SU>(module, profile_manager, system)->InstallAsService(service_manager); 295 ->InstallAsService(system.ServiceManager());
295 std::make_shared<ACC_U0>(module, profile_manager, system)->InstallAsService(service_manager); 296 std::make_shared<ACC_SU>(module, profile_manager, system)
296 std::make_shared<ACC_U1>(module, profile_manager, system)->InstallAsService(service_manager); 297 ->InstallAsService(system.ServiceManager());
298 std::make_shared<ACC_U0>(module, profile_manager, system)
299 ->InstallAsService(system.ServiceManager());
300 std::make_shared<ACC_U1>(module, profile_manager, system)
301 ->InstallAsService(system.ServiceManager());
297} 302}
298 303
299} // namespace Service::Account 304} // 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:
39}; 39};
40 40
41/// Registers all ACC services with the specified service manager. 41/// Registers all ACC services with the specified service manager.
42void InstallInterfaces(SM::ServiceManager& service_manager); 42void InstallInterfaces(Core::System& system);
43 43
44} // namespace Service::Account 44} // namespace Service::Account
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 00806b0ed..6c69f899e 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -200,7 +200,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm, Core::System& system,
200 200
201 SM::ServiceManager::InstallInterfaces(sm); 201 SM::ServiceManager::InstallInterfaces(sm);
202 202
203 Account::InstallInterfaces(*sm); 203 Account::InstallInterfaces(system);
204 AM::InstallInterfaces(*sm, nv_flinger); 204 AM::InstallInterfaces(*sm, nv_flinger);
205 AOC::InstallInterfaces(*sm); 205 AOC::InstallInterfaces(*sm);
206 APM::InstallInterfaces(*sm); 206 APM::InstallInterfaces(*sm);