summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2019-06-17 00:17:26 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2019-06-17 00:17:26 +0200
commit6ca20ad7ba594fd01c01e8d56e5e02d84609d9e1 (patch)
tree8fe27325135db3a1b8f7a9bf1fe68030b7a45d6f /src
parentSignalled accumulated_suspended_tick_changed_event on creation based on RE (diff)
downloadyuzu-6ca20ad7ba594fd01c01e8d56e5e02d84609d9e1.tar
yuzu-6ca20ad7ba594fd01c01e8d56e5e02d84609d9e1.tar.gz
yuzu-6ca20ad7ba594fd01c01e8d56e5e02d84609d9e1.tar.bz2
yuzu-6ca20ad7ba594fd01c01e8d56e5e02d84609d9e1.tar.lz
yuzu-6ca20ad7ba594fd01c01e8d56e5e02d84609d9e1.tar.xz
yuzu-6ca20ad7ba594fd01c01e8d56e5e02d84609d9e1.tar.zst
yuzu-6ca20ad7ba594fd01c01e8d56e5e02d84609d9e1.zip
Diffstat (limited to 'src')
-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 {
}
bool NACP::GetUserAccountSwitchLock() const {
- return raw.user_account_switch_lock == 1;
+ return raw.user_account_switch_lock != 0;
}
u32 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
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,
Module::Interface::~Interface() = default;
-void InstallInterfaces(SM::ServiceManager& service_manager) {
+void InstallInterfaces(Core::System& system) {
auto module = std::make_shared<Module>();
auto profile_manager = std::make_shared<ProfileManager>();
- Core::System& system = Core::System::GetInstance();
- std::make_shared<ACC_AA>(module, profile_manager, system)->InstallAsService(service_manager);
- std::make_shared<ACC_SU>(module, profile_manager, system)->InstallAsService(service_manager);
- std::make_shared<ACC_U0>(module, profile_manager, system)->InstallAsService(service_manager);
- std::make_shared<ACC_U1>(module, profile_manager, system)->InstallAsService(service_manager);
+ std::make_shared<ACC_AA>(module, profile_manager, system)
+ ->InstallAsService(system.ServiceManager());
+ std::make_shared<ACC_SU>(module, profile_manager, system)
+ ->InstallAsService(system.ServiceManager());
+ std::make_shared<ACC_U0>(module, profile_manager, system)
+ ->InstallAsService(system.ServiceManager());
+ std::make_shared<ACC_U1>(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
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,
SM::ServiceManager::InstallInterfaces(sm);
- Account::InstallInterfaces(*sm);
+ Account::InstallInterfaces(system);
AM::InstallInterfaces(*sm, nv_flinger);
AOC::InstallInterfaces(*sm);
APM::InstallInterfaces(*sm);