mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-12-18 22:43:06 +00:00
file_sys/card_image: Make bracing consistent
Makes for more consistent reading.
This commit is contained in:
parent
e34368249f
commit
81d361d9f8
1 changed files with 8 additions and 4 deletions
|
@ -63,8 +63,9 @@ XCI::XCI(VirtualFile file_)
|
||||||
program =
|
program =
|
||||||
secure_partition->GetNCA(secure_partition->GetProgramTitleID(), ContentRecordType::Program);
|
secure_partition->GetNCA(secure_partition->GetProgramTitleID(), ContentRecordType::Program);
|
||||||
program_nca_status = secure_partition->GetProgramStatus(secure_partition->GetProgramTitleID());
|
program_nca_status = secure_partition->GetProgramStatus(secure_partition->GetProgramTitleID());
|
||||||
if (program_nca_status == Loader::ResultStatus::ErrorNSPMissingProgramNCA)
|
if (program_nca_status == Loader::ResultStatus::ErrorNSPMissingProgramNCA) {
|
||||||
program_nca_status = Loader::ResultStatus::ErrorXCIMissingProgramNCA;
|
program_nca_status = Loader::ResultStatus::ErrorXCIMissingProgramNCA;
|
||||||
|
}
|
||||||
|
|
||||||
auto result = AddNCAFromPartition(XCIPartition::Update);
|
auto result = AddNCAFromPartition(XCIPartition::Update);
|
||||||
if (result != Loader::ResultStatus::Success) {
|
if (result != Loader::ResultStatus::Success) {
|
||||||
|
@ -152,8 +153,9 @@ std::shared_ptr<NCA> XCI::GetNCAByType(NCAContentType type) const {
|
||||||
|
|
||||||
VirtualFile XCI::GetNCAFileByType(NCAContentType type) const {
|
VirtualFile XCI::GetNCAFileByType(NCAContentType type) const {
|
||||||
auto nca = GetNCAByType(type);
|
auto nca = GetNCAByType(type);
|
||||||
if (nca != nullptr)
|
if (nca != nullptr) {
|
||||||
return nca->GetBaseFile();
|
return nca->GetBaseFile();
|
||||||
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,12 +181,14 @@ Loader::ResultStatus XCI::AddNCAFromPartition(XCIPartition part) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const VirtualFile& file : partitions[static_cast<std::size_t>(part)]->GetFiles()) {
|
for (const VirtualFile& file : partitions[static_cast<std::size_t>(part)]->GetFiles()) {
|
||||||
if (file->GetExtension() != "nca")
|
if (file->GetExtension() != "nca") {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
auto nca = std::make_shared<NCA>(file, nullptr, 0, keys);
|
auto nca = std::make_shared<NCA>(file, nullptr, 0, keys);
|
||||||
// TODO(DarkLordZach): Add proper Rev1+ Support
|
// TODO(DarkLordZach): Add proper Rev1+ Support
|
||||||
if (nca->IsUpdate())
|
if (nca->IsUpdate()) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
if (nca->GetType() == NCAContentType::Program) {
|
if (nca->GetType() == NCAContentType::Program) {
|
||||||
program_nca_status = nca->GetStatus();
|
program_nca_status = nca->GetStatus();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue