diff options
author | bunnei <bunneidev@gmail.com> | 2015-07-16 18:08:46 -0400 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-07-16 18:08:46 -0400 |
commit | 946f0ee2f4f5e150167ad90f86a425b50baec144 (patch) | |
tree | 47586aae7237dddc7278ef5e579cf82ad1b64e11 /src/core/file_sys/archive_romfs.h | |
parent | 0ea2319f3c371dc5dd86fbfabfe5b54392d4b664 (diff) | |
parent | 62c2a262b2992ed5f56db098b2009ec1a20480bf (diff) |
Merge pull request #918 from yuriks/romfs
Do not load entire RomFS to memory, read from the file as needed instead (rebased)
Diffstat (limited to 'src/core/file_sys/archive_romfs.h')
-rw-r--r-- | src/core/file_sys/archive_romfs.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/file_sys/archive_romfs.h b/src/core/file_sys/archive_romfs.h index c69ff91c..2bedfa9c 100644 --- a/src/core/file_sys/archive_romfs.h +++ b/src/core/file_sys/archive_romfs.h @@ -22,14 +22,16 @@ namespace FileSys { /// File system interface to the RomFS archive class ArchiveFactory_RomFS final : public ArchiveFactory { public: - ArchiveFactory_RomFS(const Loader::AppLoader& app_loader); + ArchiveFactory_RomFS(Loader::AppLoader& app_loader); std::string GetName() const override { return "RomFS"; } ResultVal<std::unique_ptr<ArchiveBackend>> Open(const Path& path) override; ResultCode Format(const Path& path) override; private: - std::shared_ptr<std::vector<u8>> romfs_data; + std::shared_ptr<FileUtil::IOFile> romfs_file; + u64 data_offset; + u64 data_size; }; } // namespace FileSys |