[NCCH] Add support for reading Miis out of NAND

This commit is contained in:
wheremyfoodat 2023-01-28 22:25:20 +02:00
parent 4e64f722e5
commit a1cb50925f
8 changed files with 6307 additions and 15 deletions

View file

@ -93,13 +93,16 @@ std::optional<u32> SelfNCCHArchive::readFile(FileSession* file, u64 offset, u32
}
break;
}
default:
Helpers::panic("Unimplemented file path type for SelfNCCH archive");
}
std::unique_ptr<u8[]> data(new u8[size]);
auto [success, bytesRead] = ioFile.readBytes(&data[0], size);
if (!success) {
Helpers::panic("Failed to read from NCCH archive");
Helpers::panic("Failed to read from SelfNCCH archive");
}
for (u64 i = 0; i < bytesRead; i++) {