Service.FS: Do archive registration using IdCode instead of name
This commit is contained in:
parent
ca67bb7945
commit
f6153679b0
7 changed files with 32 additions and 42 deletions
|
@ -162,25 +162,12 @@ private:
|
|||
|
||||
class Archive : NonCopyable {
|
||||
public:
|
||||
/// Supported archive types
|
||||
enum class IdCode : u32 {
|
||||
RomFS = 0x00000003,
|
||||
SaveData = 0x00000004,
|
||||
ExtSaveData = 0x00000006,
|
||||
SharedExtSaveData = 0x00000007,
|
||||
SystemSaveData = 0x00000008,
|
||||
SDMC = 0x00000009,
|
||||
SDMCWriteOnly = 0x0000000A,
|
||||
};
|
||||
|
||||
Archive() { }
|
||||
virtual ~Archive() { }
|
||||
|
||||
/**
|
||||
* Get the IdCode of the archive (e.g. RomFS, SaveData, etc.)
|
||||
* @return IdCode of the archive
|
||||
* Get a descriptive name for the archive (e.g. "RomFS", "SaveData", etc.)
|
||||
*/
|
||||
virtual IdCode GetIdCode() const = 0;
|
||||
virtual std::string GetName() const = 0;
|
||||
|
||||
/**
|
||||
* Open a file specified by its path, using the specified mode
|
||||
|
|
|
@ -22,11 +22,7 @@ public:
|
|||
Archive_RomFS(const Loader::AppLoader& app_loader);
|
||||
~Archive_RomFS() override;
|
||||
|
||||
/**
|
||||
* Get the IdCode of the archive (e.g. RomFS, SaveData, etc.)
|
||||
* @return IdCode of the archive
|
||||
*/
|
||||
IdCode GetIdCode() const override { return IdCode::RomFS; }
|
||||
std::string GetName() const override { return "RomFS"; }
|
||||
|
||||
/**
|
||||
* Open a file specified by its path, using the specified mode
|
||||
|
|
|
@ -26,11 +26,7 @@ public:
|
|||
*/
|
||||
bool Initialize();
|
||||
|
||||
/**
|
||||
* Get the IdCode of the archive (e.g. RomFS, SaveData, etc.)
|
||||
* @return IdCode of the archive
|
||||
*/
|
||||
IdCode GetIdCode() const override { return IdCode::SDMC; }
|
||||
std::string GetName() const override { return "SDMC"; }
|
||||
|
||||
/**
|
||||
* Open a file specified by its path, using the specified mode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue