summaryrefslogtreecommitdiffstats
path: root/src/core/loader/xci.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-08-12 01:25:30 +0200
committerGitHub <noreply@github.com>2018-08-12 01:25:30 +0200
commitbc286c169fb8b07d21e082e05152cfd6bc611b33 (patch)
tree512bc4cca3adbe98a16cae454377c2ec2638b5e3 /src/core/loader/xci.cpp
parentMerge pull request #1018 from Subv/ssy_sync (diff)
parentgame_list: Reorder error checks (diff)
downloadyuzu-bc286c169fb8b07d21e082e05152cfd6bc611b33.tar
yuzu-bc286c169fb8b07d21e082e05152cfd6bc611b33.tar.gz
yuzu-bc286c169fb8b07d21e082e05152cfd6bc611b33.tar.bz2
yuzu-bc286c169fb8b07d21e082e05152cfd6bc611b33.tar.lz
yuzu-bc286c169fb8b07d21e082e05152cfd6bc611b33.tar.xz
yuzu-bc286c169fb8b07d21e082e05152cfd6bc611b33.tar.zst
yuzu-bc286c169fb8b07d21e082e05152cfd6bc611b33.zip
Diffstat (limited to 'src/core/loader/xci.cpp')
-rw-r--r--src/core/loader/xci.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/loader/xci.cpp b/src/core/loader/xci.cpp
index d3fe24419..5d67fb186 100644
--- a/src/core/loader/xci.cpp
+++ b/src/core/loader/xci.cpp
@@ -66,10 +66,13 @@ ResultStatus AppLoader_XCI::Load(Kernel::SharedPtr<Kernel::Process>& process) {
return ResultStatus::ErrorAlreadyLoaded;
}
+ if (xci->GetStatus() != ResultStatus::Success)
+ return xci->GetStatus();
+
if (xci->GetNCAFileByType(FileSys::NCAContentType::Program) == nullptr) {
if (!Core::Crypto::KeyManager::KeyFileExists(false))
- return ResultStatus::ErrorMissingKeys;
- return ResultStatus::ErrorDecrypting;
+ return ResultStatus::ErrorMissingProductionKeyFile;
+ return ResultStatus::ErrorXCIMissingProgramNCA;
}
auto result = nca_loader->Load(process);
@@ -91,14 +94,14 @@ ResultStatus AppLoader_XCI::ReadProgramId(u64& out_program_id) {
ResultStatus AppLoader_XCI::ReadIcon(std::vector<u8>& buffer) {
if (icon_file == nullptr)
- return ResultStatus::ErrorInvalidFormat;
+ return ResultStatus::ErrorNoControl;
buffer = icon_file->ReadAllBytes();
return ResultStatus::Success;
}
ResultStatus AppLoader_XCI::ReadTitle(std::string& title) {
if (nacp_file == nullptr)
- return ResultStatus::ErrorInvalidFormat;
+ return ResultStatus::ErrorNoControl;
title = nacp_file->GetApplicationName();
return ResultStatus::Success;
}