summaryrefslogtreecommitdiff
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2014-12-15 02:44:04 -0200
committerGravatar Yuri Kunde Schlesner2014-12-16 01:08:42 -0200
commitf6153679b0781eea084b22f3ceecc74b1fe6b018 (patch)
treeaa8d86cb2a525630c3abf95cfaa658e3fd634516 /src/core/file_sys
parentHLE: Rename namespaces to match move & fix initialization order (diff)
downloadyuzu-f6153679b0781eea084b22f3ceecc74b1fe6b018.tar.gz
yuzu-f6153679b0781eea084b22f3ceecc74b1fe6b018.tar.xz
yuzu-f6153679b0781eea084b22f3ceecc74b1fe6b018.zip
Service.FS: Do archive registration using IdCode instead of name
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/archive.h17
-rw-r--r--src/core/file_sys/archive_romfs.h6
-rw-r--r--src/core/file_sys/archive_sdmc.h6
3 files changed, 4 insertions, 25 deletions
diff --git a/src/core/file_sys/archive.h b/src/core/file_sys/archive.h
index 27ed23cd0..b7978bfbe 100644
--- a/src/core/file_sys/archive.h
+++ b/src/core/file_sys/archive.h
@@ -162,25 +162,12 @@ private:
162 162
163class Archive : NonCopyable { 163class Archive : NonCopyable {
164public: 164public:
165 /// Supported archive types
166 enum class IdCode : u32 {
167 RomFS = 0x00000003,
168 SaveData = 0x00000004,
169 ExtSaveData = 0x00000006,
170 SharedExtSaveData = 0x00000007,
171 SystemSaveData = 0x00000008,
172 SDMC = 0x00000009,
173 SDMCWriteOnly = 0x0000000A,
174 };
175
176 Archive() { }
177 virtual ~Archive() { } 165 virtual ~Archive() { }
178 166
179 /** 167 /**
180 * Get the IdCode of the archive (e.g. RomFS, SaveData, etc.) 168 * Get a descriptive name for the archive (e.g. "RomFS", "SaveData", etc.)
181 * @return IdCode of the archive
182 */ 169 */
183 virtual IdCode GetIdCode() const = 0; 170 virtual std::string GetName() const = 0;
184 171
185 /** 172 /**
186 * Open a file specified by its path, using the specified mode 173 * Open a file specified by its path, using the specified mode
diff --git a/src/core/file_sys/archive_romfs.h b/src/core/file_sys/archive_romfs.h
index 222bdc356..b60fcca99 100644
--- a/src/core/file_sys/archive_romfs.h
+++ b/src/core/file_sys/archive_romfs.h
@@ -22,11 +22,7 @@ public:
22 Archive_RomFS(const Loader::AppLoader& app_loader); 22 Archive_RomFS(const Loader::AppLoader& app_loader);
23 ~Archive_RomFS() override; 23 ~Archive_RomFS() override;
24 24
25 /** 25 std::string GetName() const override { return "RomFS"; }
26 * Get the IdCode of the archive (e.g. RomFS, SaveData, etc.)
27 * @return IdCode of the archive
28 */
29 IdCode GetIdCode() const override { return IdCode::RomFS; }
30 26
31 /** 27 /**
32 * Open a file specified by its path, using the specified mode 28 * Open a file specified by its path, using the specified mode
diff --git a/src/core/file_sys/archive_sdmc.h b/src/core/file_sys/archive_sdmc.h
index 19f563a62..54c18cb0c 100644
--- a/src/core/file_sys/archive_sdmc.h
+++ b/src/core/file_sys/archive_sdmc.h
@@ -26,11 +26,7 @@ public:
26 */ 26 */
27 bool Initialize(); 27 bool Initialize();
28 28
29 /** 29 std::string GetName() const override { return "SDMC"; }
30 * Get the IdCode of the archive (e.g. RomFS, SaveData, etc.)
31 * @return IdCode of the archive
32 */
33 IdCode GetIdCode() const override { return IdCode::SDMC; }
34 30
35 /** 31 /**
36 * Open a file specified by its path, using the specified mode 32 * Open a file specified by its path, using the specified mode