diff options
author | Lioncash <mathew1800@gmail.com> | 2018-08-28 18:30:33 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-08-29 04:31:51 +0200 |
commit | 0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5 (patch) | |
tree | 2d7bb143d490c3984bff6deda426b818bf27d552 /src/core/loader/nro.cpp | |
parent | Merge pull request #1193 from lioncash/priv (diff) | |
download | yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.gz yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.bz2 yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.lz yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.xz yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.tar.zst yuzu-0cbcd6ec9aeeafc298fe2e6e4ac10d68bb7267c5.zip |
Diffstat (limited to '')
-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; |