From d26c6b3212ed36970410814593ee5ec082b1d95a Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 28 Dec 2015 13:51:44 -0500 Subject: HLE/FS: Implemented GetFormatInfo Format information is currently only implemented for the ExtSaveData, SharedExtSaveData and SaveData archives, the information is stored in a file alongside the root folder of the archive. --- src/core/file_sys/archive_extsavedata.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/core/file_sys/archive_extsavedata.h') diff --git a/src/core/file_sys/archive_extsavedata.h b/src/core/file_sys/archive_extsavedata.h index ec8d770fc..48e092ee7 100644 --- a/src/core/file_sys/archive_extsavedata.h +++ b/src/core/file_sys/archive_extsavedata.h @@ -31,10 +31,19 @@ public: std::string GetName() const override { return "ExtSaveData"; } ResultVal> Open(const Path& path) override; - ResultCode Format(const Path& path) override; + ResultCode Format(const Path& path, const FileSys::ArchiveFormatInfo& format_info) override; + ResultVal GetFormatInfo(const Path& path) const override; const std::string& GetMountPoint() const { return mount_point; } + /* + * Writes the SMDH icon of the ExtSaveData to file + * @param path Path of this ExtSaveData + * @param icon_data Binary data of the icon + * @param icon_size Size of the icon data + */ + void WriteIcon(const Path& path, u8* icon_data, u32 icon_size); + private: /** * This holds the full directory path for this archive, it is only set after a successful call -- cgit v1.2.3 From 3aa42627a3a35d8a4fb9acdcced24977d1f269cd Mon Sep 17 00:00:00 2001 From: Subv Date: Sat, 16 Jan 2016 17:01:01 -0500 Subject: HLE/FS: Corrected some style concerns. --- src/core/file_sys/archive_extsavedata.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/file_sys/archive_extsavedata.h') diff --git a/src/core/file_sys/archive_extsavedata.h b/src/core/file_sys/archive_extsavedata.h index 48e092ee7..1ebe0529f 100644 --- a/src/core/file_sys/archive_extsavedata.h +++ b/src/core/file_sys/archive_extsavedata.h @@ -36,13 +36,13 @@ public: const std::string& GetMountPoint() const { return mount_point; } - /* + /** * Writes the SMDH icon of the ExtSaveData to file * @param path Path of this ExtSaveData * @param icon_data Binary data of the icon * @param icon_size Size of the icon data */ - void WriteIcon(const Path& path, u8* icon_data, u32 icon_size); + void WriteIcon(const Path& path, const u8* icon_data, u32 icon_size); private: /** -- cgit v1.2.3 From f707026ac50c53716ac697ed439630d7728e9db6 Mon Sep 17 00:00:00 2001 From: Subv Date: Thu, 3 Mar 2016 13:05:50 -0500 Subject: HLE/FS: Change the error code returned when an ExtSaveData archive is not found. This allows Fire Emblem to boot again. --- src/core/file_sys/archive_extsavedata.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/file_sys/archive_extsavedata.h') diff --git a/src/core/file_sys/archive_extsavedata.h b/src/core/file_sys/archive_extsavedata.h index 1ebe0529f..287a6fee1 100644 --- a/src/core/file_sys/archive_extsavedata.h +++ b/src/core/file_sys/archive_extsavedata.h @@ -42,7 +42,7 @@ public: * @param icon_data Binary data of the icon * @param icon_size Size of the icon data */ - void WriteIcon(const Path& path, const u8* icon_data, u32 icon_size); + void WriteIcon(const Path& path, const u8* icon_data, size_t icon_size); private: /** @@ -51,6 +51,7 @@ private: * See GetExtSaveDataPath for the code that extracts this data from an archive path. */ std::string mount_point; + bool shared; ///< Whether this archive represents an ExtSaveData archive or a SharedExtSaveData archive }; /** -- cgit v1.2.3