ExtSaveData work

This commit is contained in:
wheremyfoodat 2023-01-22 14:23:28 +02:00
parent 902b877c40
commit 995dfb81df
12 changed files with 68 additions and 28 deletions

View file

@ -2,23 +2,23 @@
#include <algorithm>
#include <memory>
bool SaveDataArchive::openFile(const FSPath& path) {
FileDescriptor SaveDataArchive::openFile(const FSPath& path, const FilePerms& perms) {
if (!cartHasSaveData()) {
printf("Tried to read SaveData FS without save data\n");
return false;
return FileError;
}
if (path.type == PathType::UTF16 /* && path.utf16_string == u"/game_header" */) {
printf("Opened file from the SaveData archive \n");
return true;
return NoFile;
}
if (path.type != PathType::Binary) {
printf("Unimplemented SaveData path type: %d\n", path.type);
return false;
return FileError;
}
return true;
return NoFile;
}
ArchiveBase* SaveDataArchive::openArchive(const FSPath& path) {