SaveIcon and ReadExtSaveDataIcon

This commit is contained in:
Ada 2024-03-08 13:09:11 +00:00
parent 556b3b8913
commit d4594446bd
No known key found for this signature in database
GPG key ID: 066E56D5C9F4E50D
6 changed files with 110 additions and 18 deletions

View file

@ -57,6 +57,14 @@ namespace ArchiveID {
}
}
namespace MediaType {
enum : u8 {
NAND = 0,
SD = 1,
Gamecard = 2
};
};
struct FSPath {
u32 type = PathType::Invalid;

View file

@ -22,6 +22,9 @@ public:
std::optional<u32> readFile(FileSession* file, u64 offset, u32 size, u32 dataPointer) override;
void format(const FSPath& path, const FormatInfo& info) override;
Rust::Result<FormatInfo, HorizonResult> getFormatInfo(const FSPath& path) override;
void clear(const FSPath& path) const;
void saveIcon(const std::vector<u8>& data) const;
Rust::Result<std::vector<u8>, HorizonResult> loadIcon() const;
std::filesystem::path getFormatInfoPath(const FSPath& path) const;
std::filesystem::path getUserDataPath() const;

View file

@ -42,6 +42,7 @@ class FSService {
Rust::Result<Handle, HorizonResult> openDirectoryHandle(ArchiveBase* archive, const FSPath& path);
std::optional<Handle> openFileHandle(ArchiveBase* archive, const FSPath& path, const FSPath& archivePath, const FilePerms& perms);
FSPath readPath(u32 type, u32 pointer, u32 size);
void writePointer(const u8* data, u32 pointer, u32 size);
const EmulatorConfig& config;
@ -78,6 +79,7 @@ class FSService {
void setArchivePriority(u32 messagePointer);
void setPriority(u32 messagePointer);
void setThisSaveDataSecureValue(u32 messagePointer);
void readExtSaveDataIcon(u32 messagePointer);
// Used for set/get priority: Not sure what sort of priority this is referring to
u32 priority;