diff options
| author | 2019-06-10 23:13:14 -0400 | |
|---|---|---|
| committer | 2019-06-10 23:27:13 -0400 | |
| commit | 81d361d9f89ba8eada4bf2e414cf610873045ac6 (patch) | |
| tree | fb286d8e3b274ebc4b6c466ce01025949086a3d9 /src | |
| parent | file_sys/card_image: Assign collapsed NCA contents directly to ncas member (diff) | |
| download | yuzu-81d361d9f89ba8eada4bf2e414cf610873045ac6.tar.gz yuzu-81d361d9f89ba8eada4bf2e414cf610873045ac6.tar.xz yuzu-81d361d9f89ba8eada4bf2e414cf610873045ac6.zip | |
file_sys/card_image: Make bracing consistent
Makes for more consistent reading.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/file_sys/card_image.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/file_sys/card_image.cpp b/src/core/file_sys/card_image.cpp index d116d79c1..1a5faa43a 100644 --- a/src/core/file_sys/card_image.cpp +++ b/src/core/file_sys/card_image.cpp | |||
| @@ -63,8 +63,9 @@ XCI::XCI(VirtualFile file_) | |||
| 63 | program = | 63 | program = |
| 64 | secure_partition->GetNCA(secure_partition->GetProgramTitleID(), ContentRecordType::Program); | 64 | secure_partition->GetNCA(secure_partition->GetProgramTitleID(), ContentRecordType::Program); |
| 65 | program_nca_status = secure_partition->GetProgramStatus(secure_partition->GetProgramTitleID()); | 65 | program_nca_status = secure_partition->GetProgramStatus(secure_partition->GetProgramTitleID()); |
| 66 | if (program_nca_status == Loader::ResultStatus::ErrorNSPMissingProgramNCA) | 66 | if (program_nca_status == Loader::ResultStatus::ErrorNSPMissingProgramNCA) { |
| 67 | program_nca_status = Loader::ResultStatus::ErrorXCIMissingProgramNCA; | 67 | program_nca_status = Loader::ResultStatus::ErrorXCIMissingProgramNCA; |
| 68 | } | ||
| 68 | 69 | ||
| 69 | auto result = AddNCAFromPartition(XCIPartition::Update); | 70 | auto result = AddNCAFromPartition(XCIPartition::Update); |
| 70 | if (result != Loader::ResultStatus::Success) { | 71 | if (result != Loader::ResultStatus::Success) { |
| @@ -152,8 +153,9 @@ std::shared_ptr<NCA> XCI::GetNCAByType(NCAContentType type) const { | |||
| 152 | 153 | ||
| 153 | VirtualFile XCI::GetNCAFileByType(NCAContentType type) const { | 154 | VirtualFile XCI::GetNCAFileByType(NCAContentType type) const { |
| 154 | auto nca = GetNCAByType(type); | 155 | auto nca = GetNCAByType(type); |
| 155 | if (nca != nullptr) | 156 | if (nca != nullptr) { |
| 156 | return nca->GetBaseFile(); | 157 | return nca->GetBaseFile(); |
| 158 | } | ||
| 157 | return nullptr; | 159 | return nullptr; |
| 158 | } | 160 | } |
| 159 | 161 | ||
| @@ -179,12 +181,14 @@ Loader::ResultStatus XCI::AddNCAFromPartition(XCIPartition part) { | |||
| 179 | } | 181 | } |
| 180 | 182 | ||
| 181 | for (const VirtualFile& file : partitions[static_cast<std::size_t>(part)]->GetFiles()) { | 183 | for (const VirtualFile& file : partitions[static_cast<std::size_t>(part)]->GetFiles()) { |
| 182 | if (file->GetExtension() != "nca") | 184 | if (file->GetExtension() != "nca") { |
| 183 | continue; | 185 | continue; |
| 186 | } | ||
| 184 | auto nca = std::make_shared<NCA>(file, nullptr, 0, keys); | 187 | auto nca = std::make_shared<NCA>(file, nullptr, 0, keys); |
| 185 | // TODO(DarkLordZach): Add proper Rev1+ Support | 188 | // TODO(DarkLordZach): Add proper Rev1+ Support |
| 186 | if (nca->IsUpdate()) | 189 | if (nca->IsUpdate()) { |
| 187 | continue; | 190 | continue; |
| 191 | } | ||
| 188 | if (nca->GetType() == NCAContentType::Program) { | 192 | if (nca->GetType() == NCAContentType::Program) { |
| 189 | program_nca_status = nca->GetStatus(); | 193 | program_nca_status = nca->GetStatus(); |
| 190 | } | 194 | } |