summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/acc/acc.cpp
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2019-06-16 12:18:35 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2019-06-16 12:18:35 +0200
commit5fb6781c6104a618ee366c444725e32765a0c534 (patch)
tree8df22f0172e08926f9f9057f5f31e357fa56aa58 /src/core/hle/service/acc/acc.cpp
parentImpl'd IsUserAccountSwitchLocked, SetAudioOutVolume, GetAudioOutVolume & Partial impl of GetAccumulatedSuspendedTickChangedEvent (diff)
downloadyuzu-5fb6781c6104a618ee366c444725e32765a0c534.tar
yuzu-5fb6781c6104a618ee366c444725e32765a0c534.tar.gz
yuzu-5fb6781c6104a618ee366c444725e32765a0c534.tar.bz2
yuzu-5fb6781c6104a618ee366c444725e32765a0c534.tar.lz
yuzu-5fb6781c6104a618ee366c444725e32765a0c534.tar.xz
yuzu-5fb6781c6104a618ee366c444725e32765a0c534.tar.zst
yuzu-5fb6781c6104a618ee366c444725e32765a0c534.zip
Diffstat (limited to 'src/core/hle/service/acc/acc.cpp')
-rw-r--r--src/core/hle/service/acc/acc.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp
index 7a4fd636b..f02f54f91 100644
--- a/src/core/hle/service/acc/acc.cpp
+++ b/src/core/hle/service/acc/acc.cpp
@@ -233,13 +233,13 @@ void Module::Interface::GetBaasAccountManagerForApplication(Kernel::HLERequestCo
void Module::Interface::IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_ACC, "called");
FileSys::NACP nacp;
- const auto res = Core::System::GetInstance().GetAppLoader().ReadControlData(nacp);
+ const auto res = system.GetAppLoader().ReadControlData(nacp);
bool is_locked = false;
if (res != Loader::ResultStatus::Success) {
- FileSys::PatchManager pm{Core::CurrentProcess()->GetTitleID()};
- auto [nacp_unique, discard] = pm.GetControlMetadata();
+ FileSys::PatchManager pm{system.CurrentProcess()->GetTitleID()};
+ auto nacp_unique = pm.GetControlMetadata().first;
if (nacp_unique != nullptr) {
is_locked = nacp_unique->GetUserAccountSwitchLock();
@@ -250,7 +250,7 @@ void Module::Interface::IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx
IPC::ResponseBuilder rb{ctx, 3};
rb.Push(RESULT_SUCCESS);
- rb.PushRaw<u8>(is_locked);
+ rb.Push(is_locked);
}
void Module::Interface::TrySelectUserWithoutInteraction(Kernel::HLERequestContext& ctx) {
@@ -278,19 +278,22 @@ void Module::Interface::TrySelectUserWithoutInteraction(Kernel::HLERequestContex
}
Module::Interface::Interface(std::shared_ptr<Module> module,
- std::shared_ptr<ProfileManager> profile_manager, const char* name)
+ std::shared_ptr<ProfileManager> profile_manager, Core::System& system,
+ const char* name)
: ServiceFramework(name), module(std::move(module)),
- profile_manager(std::move(profile_manager)) {}
+ profile_manager(std::move(profile_manager)), system(system) {}
Module::Interface::~Interface() = default;
void InstallInterfaces(SM::ServiceManager& service_manager) {
auto module = std::make_shared<Module>();
auto profile_manager = std::make_shared<ProfileManager>();
- std::make_shared<ACC_AA>(module, profile_manager)->InstallAsService(service_manager);
- std::make_shared<ACC_SU>(module, profile_manager)->InstallAsService(service_manager);
- std::make_shared<ACC_U0>(module, profile_manager)->InstallAsService(service_manager);
- std::make_shared<ACC_U1>(module, profile_manager)->InstallAsService(service_manager);
+ 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);
}
} // namespace Service::Account