patch_manager: Remove usages of the global system instance

With this, only 19 usages of the global system instance remain within
the core library.

We're almost there.
This commit is contained in:
Lioncash 2020-11-18 07:53:10 -05:00
parent abda366362
commit 6f8a06bac5
26 changed files with 259 additions and 157 deletions

View file

@ -742,8 +742,10 @@ void Module::Interface::IsUserAccountSwitchLocked(Kernel::HLERequestContext& ctx
bool is_locked = false;
if (res != Loader::ResultStatus::Success) {
FileSys::PatchManager pm{system.CurrentProcess()->GetTitleID()};
auto nacp_unique = pm.GetControlMetadata().first;
const FileSys::PatchManager pm{system.CurrentProcess()->GetTitleID(),
system.GetFileSystemController(),
system.GetContentProvider()};
const auto nacp_unique = pm.GetControlMetadata().first;
if (nacp_unique != nullptr) {
is_locked = nacp_unique->GetUserAccountSwitchLock();