file_sys/ncch_container: Expose ncch_offset during instantiation and in OpenFile

This commit is contained in:
shinyquagsire23
2017-11-15 17:30:52 -07:00
parent f55f4fc684
commit 549f11a40e
2 changed files with 9 additions and 7 deletions

View File

@ -168,10 +168,10 @@ namespace FileSys {
*/
class NCCHContainer {
public:
NCCHContainer(const std::string& filepath);
NCCHContainer(const std::string& filepath, u32 ncch_offset = 0);
NCCHContainer() {}
Loader::ResultStatus OpenFile(const std::string& filepath);
Loader::ResultStatus OpenFile(const std::string& filepath, u32 ncch_offset = 0);
/**
* Ensure ExeFS and exheader is loaded and ready for reading sections
@ -263,7 +263,7 @@ private:
bool is_loaded = false;
bool is_compressed = false;
u32 ncch_offset = 0; // Offset to NCCH header, can be 0 or after NCSD header
u32 ncch_offset = 0; // Offset to NCCH header, can be 0 for NCCHs or non-zero for CIAs/NCSDs
u32 exefs_offset = 0;
std::string filepath;