diff options
| author | 2018-08-11 19:25:30 -0400 | |
|---|---|---|
| committer | 2018-08-11 19:25:30 -0400 | |
| commit | bc286c169fb8b07d21e082e05152cfd6bc611b33 (patch) | |
| tree | 512bc4cca3adbe98a16cae454377c2ec2638b5e3 /src/core/loader/xci.cpp | |
| parent | Merge pull request #1018 from Subv/ssy_sync (diff) | |
| parent | game_list: Reorder error checks (diff) | |
| download | yuzu-bc286c169fb8b07d21e082e05152cfd6bc611b33.tar.gz yuzu-bc286c169fb8b07d21e082e05152cfd6bc611b33.tar.xz yuzu-bc286c169fb8b07d21e082e05152cfd6bc611b33.zip | |
Merge pull request #970 from DarkLordZach/loader-errors
loader: Add more descriptive errors
Diffstat (limited to 'src/core/loader/xci.cpp')
| -rw-r--r-- | src/core/loader/xci.cpp | 11 |
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) { | |||
| 66 | return ResultStatus::ErrorAlreadyLoaded; | 66 | return ResultStatus::ErrorAlreadyLoaded; |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | if (xci->GetStatus() != ResultStatus::Success) | ||
| 70 | return xci->GetStatus(); | ||
| 71 | |||
| 69 | if (xci->GetNCAFileByType(FileSys::NCAContentType::Program) == nullptr) { | 72 | if (xci->GetNCAFileByType(FileSys::NCAContentType::Program) == nullptr) { |
| 70 | if (!Core::Crypto::KeyManager::KeyFileExists(false)) | 73 | if (!Core::Crypto::KeyManager::KeyFileExists(false)) |
| 71 | return ResultStatus::ErrorMissingKeys; | 74 | return ResultStatus::ErrorMissingProductionKeyFile; |
| 72 | return ResultStatus::ErrorDecrypting; | 75 | return ResultStatus::ErrorXCIMissingProgramNCA; |
| 73 | } | 76 | } |
| 74 | 77 | ||
| 75 | auto result = nca_loader->Load(process); | 78 | auto result = nca_loader->Load(process); |
| @@ -91,14 +94,14 @@ ResultStatus AppLoader_XCI::ReadProgramId(u64& out_program_id) { | |||
| 91 | 94 | ||
| 92 | ResultStatus AppLoader_XCI::ReadIcon(std::vector<u8>& buffer) { | 95 | ResultStatus AppLoader_XCI::ReadIcon(std::vector<u8>& buffer) { |
| 93 | if (icon_file == nullptr) | 96 | if (icon_file == nullptr) |
| 94 | return ResultStatus::ErrorInvalidFormat; | 97 | return ResultStatus::ErrorNoControl; |
| 95 | buffer = icon_file->ReadAllBytes(); | 98 | buffer = icon_file->ReadAllBytes(); |
| 96 | return ResultStatus::Success; | 99 | return ResultStatus::Success; |
| 97 | } | 100 | } |
| 98 | 101 | ||
| 99 | ResultStatus AppLoader_XCI::ReadTitle(std::string& title) { | 102 | ResultStatus AppLoader_XCI::ReadTitle(std::string& title) { |
| 100 | if (nacp_file == nullptr) | 103 | if (nacp_file == nullptr) |
| 101 | return ResultStatus::ErrorInvalidFormat; | 104 | return ResultStatus::ErrorNoControl; |
| 102 | title = nacp_file->GetApplicationName(); | 105 | title = nacp_file->GetApplicationName(); |
| 103 | return ResultStatus::Success; | 106 | return ResultStatus::Success; |
| 104 | } | 107 | } |