mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-15 19:57:08 +12:00
Update ExtData branch to current codebase
Co-Authored-By: Ada Ahmed <ada@chronovore.dev>
This commit is contained in:
parent
7257f34ff5
commit
667717ef91
7 changed files with 290 additions and 52 deletions
|
@ -1,4 +1,6 @@
|
|||
#pragma once
|
||||
#include <unordered_map>
|
||||
|
||||
#include "config.hpp"
|
||||
#include "fs/archive_card_spi.hpp"
|
||||
#include "fs/archive_ext_save_data.hpp"
|
||||
|
@ -37,16 +39,20 @@ class FSService {
|
|||
// UserSaveData archives
|
||||
UserSaveDataArchive userSaveData1;
|
||||
UserSaveDataArchive userSaveData2;
|
||||
|
||||
ExtSaveDataArchive extSaveData_sdmc;
|
||||
ExtSaveDataArchive sharedExtSaveData_nand;
|
||||
SystemSaveDataArchive systemSaveData;
|
||||
|
||||
TWLPhotoArchive twlPhoto;
|
||||
TWLSoundArchive twlSound;
|
||||
CardSPIArchive cardSpi;
|
||||
|
||||
std::unordered_map<u64, ExtSaveDataArchive> extSaveData_sdmc;
|
||||
std::unordered_map<u64, ExtSaveDataArchive> nandExtSaveData_nand;
|
||||
|
||||
|
||||
ArchiveBase* getArchiveFromID(u32 id, const FSPath& archivePath);
|
||||
ExtSaveDataArchive* getExtArchiveFromID(u64 saveId, bool isShared);
|
||||
ExtSaveDataArchive* getNANDExtArchiveFromID(u64 saveId, bool isShared);
|
||||
|
||||
Rust::Result<Handle, HorizonResult> openArchiveHandle(u32 archiveID, const FSPath& path);
|
||||
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);
|
||||
|
@ -63,6 +69,8 @@ class FSService {
|
|||
void closeArchive(u32 messagePointer);
|
||||
void controlArchive(u32 messagePointer);
|
||||
void deleteDirectory(u32 messagePointer);
|
||||
void deleteDirectoryRecursively(u32 messagePointer);
|
||||
|
||||
void deleteExtSaveData(u32 messagePointer);
|
||||
void deleteFile(u32 messagePointer);
|
||||
void formatSaveData(u32 messagePointer);
|
||||
|
@ -86,14 +94,14 @@ 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;
|
||||
|
||||
public:
|
||||
FSService(Memory& mem, Kernel& kernel, const EmulatorConfig& config)
|
||||
: mem(mem), saveData(mem), sharedExtSaveData_nand(mem, "../SharedFiles/NAND", true), extSaveData_sdmc(mem, "SDMC"), sdmc(mem),
|
||||
sdmcWriteOnly(mem, true), selfNcch(mem), ncch(mem), userSaveData1(mem, ArchiveID::UserSaveData1),
|
||||
: mem(mem), saveData(mem), sdmc(mem), sdmcWriteOnly(mem, true), selfNcch(mem), ncch(mem), userSaveData1(mem, ArchiveID::UserSaveData1),
|
||||
userSaveData2(mem, ArchiveID::UserSaveData2), systemSaveData(mem), twlPhoto(mem), twlSound(mem), cardSpi(mem), kernel(kernel),
|
||||
config(config) {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue