diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-08-16 22:57:00 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-08-23 17:52:44 +0200 |
commit | a9dc5a3c1058d22873a201c08bd6d095405789ae (patch) | |
tree | daa6c23dcc4f3b3367eaf254689e427865b9e84e /src/core/loader | |
parent | Merge pull request #1157 from lioncash/vec (diff) | |
download | yuzu-a9dc5a3c1058d22873a201c08bd6d095405789ae.tar yuzu-a9dc5a3c1058d22873a201c08bd6d095405789ae.tar.gz yuzu-a9dc5a3c1058d22873a201c08bd6d095405789ae.tar.bz2 yuzu-a9dc5a3c1058d22873a201c08bd6d095405789ae.tar.lz yuzu-a9dc5a3c1058d22873a201c08bd6d095405789ae.tar.xz yuzu-a9dc5a3c1058d22873a201c08bd6d095405789ae.tar.zst yuzu-a9dc5a3c1058d22873a201c08bd6d095405789ae.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/loader/xci.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/loader/xci.cpp b/src/core/loader/xci.cpp index 4c4979545..9dc4d1f35 100644 --- a/src/core/loader/xci.cpp +++ b/src/core/loader/xci.cpp @@ -61,11 +61,12 @@ ResultStatus AppLoader_XCI::Load(Kernel::SharedPtr<Kernel::Process>& process) { if (xci->GetStatus() != ResultStatus::Success) return xci->GetStatus(); - if (xci->GetNCAFileByType(FileSys::NCAContentType::Program) == nullptr) { - if (!Core::Crypto::KeyManager::KeyFileExists(false)) - return ResultStatus::ErrorMissingProductionKeyFile; - return ResultStatus::ErrorXCIMissingProgramNCA; - } + if (xci->GetProgramNCAStatus() != ResultStatus::Success) + return xci->GetProgramNCAStatus(); + + const auto nca = xci->GetNCAFileByType(FileSys::NCAContentType::Program); + if (nca == nullptr && !Core::Crypto::KeyManager::KeyFileExists(false)) + return ResultStatus::ErrorMissingProductionKeyFile; auto result = nca_loader->Load(process); if (result != ResultStatus::Success) |