loader: Add ReadRomFSIVFCOffset to NSP, XCI, and NAX loaders

Fixes errors with certain updates
This commit is contained in:
Zach Hilman 2018-09-25 09:17:14 -04:00
parent f85f2b3728
commit e948fbf5d0
6 changed files with 20 additions and 6 deletions

View file

@ -72,6 +72,10 @@ ResultStatus AppLoader_NAX::ReadRomFS(FileSys::VirtualFile& dir) {
return nca_loader->ReadRomFS(dir); return nca_loader->ReadRomFS(dir);
} }
u64 AppLoader_NAX::ReadRomFSIVFCOffset() const {
return nca_loader->ReadRomFSIVFCOffset();
}
ResultStatus AppLoader_NAX::ReadProgramId(u64& out_program_id) { ResultStatus AppLoader_NAX::ReadProgramId(u64& out_program_id) {
return nca_loader->ReadProgramId(out_program_id); return nca_loader->ReadProgramId(out_program_id);
} }

View file

@ -36,6 +36,7 @@ public:
ResultStatus Load(Kernel::Process& process) override; ResultStatus Load(Kernel::Process& process) override;
ResultStatus ReadRomFS(FileSys::VirtualFile& dir) override; ResultStatus ReadRomFS(FileSys::VirtualFile& dir) override;
u64 ReadRomFSIVFCOffset() const override;
ResultStatus ReadProgramId(u64& out_program_id) override; ResultStatus ReadProgramId(u64& out_program_id) override;
private: private:

View file

@ -96,8 +96,12 @@ ResultStatus AppLoader_NSP::Load(Kernel::Process& process) {
return ResultStatus::Success; return ResultStatus::Success;
} }
ResultStatus AppLoader_NSP::ReadRomFS(FileSys::VirtualFile& dir) { ResultStatus AppLoader_NSP::ReadRomFS(FileSys::VirtualFile& file) {
return secondary_loader->ReadRomFS(dir); return secondary_loader->ReadRomFS(file);
}
u64 AppLoader_NSP::ReadRomFSIVFCOffset() const {
return secondary_loader->ReadRomFSIVFCOffset();
} }
ResultStatus AppLoader_NSP::ReadProgramId(u64& out_program_id) { ResultStatus AppLoader_NSP::ReadProgramId(u64& out_program_id) {

View file

@ -37,7 +37,8 @@ public:
ResultStatus Load(Kernel::Process& process) override; ResultStatus Load(Kernel::Process& process) override;
ResultStatus ReadRomFS(FileSys::VirtualFile& dir) override; ResultStatus ReadRomFS(FileSys::VirtualFile& file) override;
u64 ReadRomFSIVFCOffset() const override;
ResultStatus ReadProgramId(u64& out_program_id) override; ResultStatus ReadProgramId(u64& out_program_id) override;
ResultStatus ReadIcon(std::vector<u8>& buffer) override; ResultStatus ReadIcon(std::vector<u8>& buffer) override;
ResultStatus ReadTitle(std::string& title) override; ResultStatus ReadTitle(std::string& title) override;

View file

@ -68,10 +68,13 @@ ResultStatus AppLoader_XCI::Load(Kernel::Process& process) {
return ResultStatus::Success; return ResultStatus::Success;
} }
ResultStatus AppLoader_XCI::ReadRomFS(FileSys::VirtualFile& dir) { ResultStatus AppLoader_XCI::ReadRomFS(FileSys::VirtualFile& file) {
return nca_loader->ReadRomFS(dir); return nca_loader->ReadRomFS(file);
} }
u64 AppLoader_XCI::ReadRomFSIVFCOffset() const {
return nca_loader->ReadRomFSIVFCOffset();
}
ResultStatus AppLoader_XCI::ReadProgramId(u64& out_program_id) { ResultStatus AppLoader_XCI::ReadProgramId(u64& out_program_id) {
return nca_loader->ReadProgramId(out_program_id); return nca_loader->ReadProgramId(out_program_id);
} }

View file

@ -37,7 +37,8 @@ public:
ResultStatus Load(Kernel::Process& process) override; ResultStatus Load(Kernel::Process& process) override;
ResultStatus ReadRomFS(FileSys::VirtualFile& dir) override; ResultStatus ReadRomFS(FileSys::VirtualFile& file) override;
u64 ReadRomFSIVFCOffset() const override;
ResultStatus ReadProgramId(u64& out_program_id) override; ResultStatus ReadProgramId(u64& out_program_id) override;
ResultStatus ReadIcon(std::vector<u8>& buffer) override; ResultStatus ReadIcon(std::vector<u8>& buffer) override;
ResultStatus ReadTitle(std::string& title) override; ResultStatus ReadTitle(std::string& title) override;