file_sys: Support load game collection (#6582)

Adds support for loading games with multiple programs embedded within such as the Dragon Quest 1+2+3 Collection
This commit is contained in:
Feng Chen
2021-07-20 13:10:05 +08:00
committed by GitHub
parent 16f983d33a
commit 07073734ed
17 changed files with 172 additions and 109 deletions

View File

@ -226,6 +226,17 @@ public:
return ResultStatus::ErrorNotImplemented;
}
/**
* Get the program ids of the application
*
* @param[out] out_program_ids Reference to store program ids into
*
* @return ResultStatus result of function
*/
virtual ResultStatus ReadProgramIds(std::vector<u64>& out_program_ids) {
return ResultStatus::ErrorNotImplemented;
}
/**
* Get the RomFS of the application
* Since the RomFS can be huge, we return a file reference instead of copying to a buffer
@ -324,6 +335,6 @@ protected:
* @return the best loader for this file.
*/
std::unique_ptr<AppLoader> GetLoader(Core::System& system, FileSys::VirtualFile file,
std::size_t program_index = 0);
u64 program_id = 0, std::size_t program_index = 0);
} // namespace Loader