diff options
author | bunnei <bunneidev@gmail.com> | 2018-08-30 16:02:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-30 16:02:50 +0200 |
commit | 5094dfa081c7275e35496374a42996b11f0f6005 (patch) | |
tree | 8cdfb8c270c6299a1b172fb9c14856684bedf084 /src/core/loader/nro.cpp | |
parent | Merge pull request #1202 from FearlessTobi/port-3825 (diff) | |
parent | kernel: Eliminate kernel global state (diff) | |
download | yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar.gz yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar.bz2 yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar.lz yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar.xz yuzu-5094dfa081c7275e35496374a42996b11f0f6005.tar.zst yuzu-5094dfa081c7275e35496374a42996b11f0f6005.zip |
Diffstat (limited to 'src/core/loader/nro.cpp')
-rw-r--r-- | src/core/loader/nro.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp index 2179cf2ea..00205d1d2 100644 --- a/src/core/loader/nro.cpp +++ b/src/core/loader/nro.cpp @@ -136,7 +136,8 @@ bool AppLoader_NRO::LoadNro(FileSys::VirtualFile file, VAddr load_base) { } // Build program image - Kernel::SharedPtr<Kernel::CodeSet> codeset = Kernel::CodeSet::Create(""); + auto& kernel = Core::System::GetInstance().Kernel(); + Kernel::SharedPtr<Kernel::CodeSet> codeset = Kernel::CodeSet::Create(kernel, ""); std::vector<u8> program_image = file->ReadBytes(PageAlignSize(nro_header.file_size)); if (program_image.size() != PageAlignSize(nro_header.file_size)) { return {}; @@ -185,9 +186,10 @@ ResultStatus AppLoader_NRO::Load(Kernel::SharedPtr<Kernel::Process>& process) { return ResultStatus::ErrorLoadingNRO; } + auto& kernel = Core::System::GetInstance().Kernel(); process->svc_access_mask.set(); process->resource_limit = - Kernel::ResourceLimit::GetForCategory(Kernel::ResourceLimitCategory::APPLICATION); + kernel.ResourceLimitForCategory(Kernel::ResourceLimitCategory::APPLICATION); process->Run(base_addr, THREADPRIO_DEFAULT, Memory::DEFAULT_STACK_SIZE); is_loaded = true; |