diff options
author | bunnei <bunneidev@gmail.com> | 2019-04-20 01:09:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-20 01:09:20 +0200 |
commit | 40dc893c372c81c687eca2d0b964220a8f8aeab4 (patch) | |
tree | 1c05675d446978752a749f2cb18a797c6b737998 /src/core/loader/nro.cpp | |
parent | Merge pull request #2397 from lioncash/thread-unused (diff) | |
parent | core/core: Move process execution start to System's Load() (diff) | |
download | yuzu-40dc893c372c81c687eca2d0b964220a8f8aeab4.tar yuzu-40dc893c372c81c687eca2d0b964220a8f8aeab4.tar.gz yuzu-40dc893c372c81c687eca2d0b964220a8f8aeab4.tar.bz2 yuzu-40dc893c372c81c687eca2d0b964220a8f8aeab4.tar.lz yuzu-40dc893c372c81c687eca2d0b964220a8f8aeab4.tar.xz yuzu-40dc893c372c81c687eca2d0b964220a8f8aeab4.tar.zst yuzu-40dc893c372c81c687eca2d0b964220a8f8aeab4.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/loader/nro.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp index 31e4a0c84..6a0ca389b 100644 --- a/src/core/loader/nro.cpp +++ b/src/core/loader/nro.cpp @@ -201,25 +201,25 @@ bool AppLoader_NRO::LoadNro(Kernel::Process& process, const FileSys::VfsFile& fi return LoadNroImpl(process, file.ReadAllBytes(), file.GetName(), load_base); } -ResultStatus AppLoader_NRO::Load(Kernel::Process& process) { +AppLoader_NRO::LoadResult AppLoader_NRO::Load(Kernel::Process& process) { if (is_loaded) { - return ResultStatus::ErrorAlreadyLoaded; + return {ResultStatus::ErrorAlreadyLoaded, {}}; } // Load NRO const VAddr base_address = process.VMManager().GetCodeRegionBaseAddress(); if (!LoadNro(process, *file, base_address)) { - return ResultStatus::ErrorLoadingNRO; + return {ResultStatus::ErrorLoadingNRO, {}}; } - if (romfs != nullptr) + if (romfs != nullptr) { Service::FileSystem::RegisterRomFS(std::make_unique<FileSys::RomFSFactory>(*this)); - - process.Run(base_address, Kernel::THREADPRIO_DEFAULT, Memory::DEFAULT_STACK_SIZE); + } is_loaded = true; - return ResultStatus::Success; + return {ResultStatus::Success, + LoadParameters{Kernel::THREADPRIO_DEFAULT, Memory::DEFAULT_STACK_SIZE}}; } ResultStatus AppLoader_NRO::ReadIcon(std::vector<u8>& buffer) { |