|
|
@ -43,6 +43,8 @@ XCI::XCI(VirtualFile file_) : file(std::move(file_)), partitions(0x4) {
|
|
|
|
partitions[static_cast<size_t>(partition)] = std::make_shared<PartitionFilesystem>(raw);
|
|
|
|
partitions[static_cast<size_t>(partition)] = std::make_shared<PartitionFilesystem>(raw);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
program_nca_status = Loader::ResultStatus::ErrorXCIMissingProgramNCA;
|
|
|
|
|
|
|
|
|
|
|
|
auto result = AddNCAFromPartition(XCIPartition::Secure);
|
|
|
|
auto result = AddNCAFromPartition(XCIPartition::Secure);
|
|
|
|
if (result != Loader::ResultStatus::Success) {
|
|
|
|
if (result != Loader::ResultStatus::Success) {
|
|
|
|
status = result;
|
|
|
|
status = result;
|
|
|
@ -76,6 +78,10 @@ Loader::ResultStatus XCI::GetStatus() const {
|
|
|
|
return status;
|
|
|
|
return status;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Loader::ResultStatus XCI::GetProgramNCAStatus() const {
|
|
|
|
|
|
|
|
return program_nca_status;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
VirtualDir XCI::GetPartition(XCIPartition partition) const {
|
|
|
|
VirtualDir XCI::GetPartition(XCIPartition partition) const {
|
|
|
|
return partitions[static_cast<size_t>(partition)];
|
|
|
|
return partitions[static_cast<size_t>(partition)];
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -143,6 +149,9 @@ Loader::ResultStatus XCI::AddNCAFromPartition(XCIPartition part) {
|
|
|
|
if (file->GetExtension() != "nca")
|
|
|
|
if (file->GetExtension() != "nca")
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
auto nca = std::make_shared<NCA>(file);
|
|
|
|
auto nca = std::make_shared<NCA>(file);
|
|
|
|
|
|
|
|
if (nca->GetType() == NCAContentType::Program) {
|
|
|
|
|
|
|
|
program_nca_status = nca->GetStatus();
|
|
|
|
|
|
|
|
}
|
|
|
|
if (nca->GetStatus() == Loader::ResultStatus::Success) {
|
|
|
|
if (nca->GetStatus() == Loader::ResultStatus::Success) {
|
|
|
|
ncas.push_back(std::move(nca));
|
|
|
|
ncas.push_back(std::move(nca));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|