diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-04-23 20:38:18 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-09-21 22:50:39 +0200 |
commit | a49169e81906d230fd6bfc7546acc6f763f4c321 (patch) | |
tree | eceaf472b9e52755b333f0945d14c4bddc1b741c /src/core/file_sys | |
parent | yuzu: Add UI to manage filesystem paths and sizes (diff) | |
download | yuzu-a49169e81906d230fd6bfc7546acc6f763f4c321.tar yuzu-a49169e81906d230fd6bfc7546acc6f763f4c321.tar.gz yuzu-a49169e81906d230fd6bfc7546acc6f763f4c321.tar.bz2 yuzu-a49169e81906d230fd6bfc7546acc6f763f4c321.tar.lz yuzu-a49169e81906d230fd6bfc7546acc6f763f4c321.tar.xz yuzu-a49169e81906d230fd6bfc7546acc6f763f4c321.tar.zst yuzu-a49169e81906d230fd6bfc7546acc6f763f4c321.zip |
Diffstat (limited to 'src/core/file_sys')
-rw-r--r-- | src/core/file_sys/romfs_factory.cpp | 5 | ||||
-rw-r--r-- | src/core/file_sys/romfs_factory.h | 4 | ||||
-rw-r--r-- | src/core/file_sys/savedata_factory.cpp | 7 | ||||
-rw-r--r-- | src/core/file_sys/savedata_factory.h | 7 | ||||
-rw-r--r-- | src/core/file_sys/sdmc_factory.cpp | 2 | ||||
-rw-r--r-- | src/core/file_sys/sdmc_factory.h | 2 |
6 files changed, 15 insertions, 12 deletions
diff --git a/src/core/file_sys/romfs_factory.cpp b/src/core/file_sys/romfs_factory.cpp index c3ee4a158..84cd4684c 100644 --- a/src/core/file_sys/romfs_factory.cpp +++ b/src/core/file_sys/romfs_factory.cpp @@ -35,7 +35,7 @@ void RomFSFactory::SetPackedUpdate(VirtualFile update_raw) { this->update_raw = std::move(update_raw); } -ResultVal<VirtualFile> RomFSFactory::OpenCurrentProcess() { +ResultVal<VirtualFile> RomFSFactory::OpenCurrentProcess() const { if (!updatable) return MakeResult<VirtualFile>(file); @@ -44,7 +44,8 @@ ResultVal<VirtualFile> RomFSFactory::OpenCurrentProcess() { patch_manager.PatchRomFS(file, ivfc_offset, ContentRecordType::Program, update_raw)); } -ResultVal<VirtualFile> RomFSFactory::Open(u64 title_id, StorageId storage, ContentRecordType type) { +ResultVal<VirtualFile> RomFSFactory::Open(u64 title_id, StorageId storage, + ContentRecordType type) const { std::shared_ptr<NCA> res; switch (storage) { diff --git a/src/core/file_sys/romfs_factory.h b/src/core/file_sys/romfs_factory.h index 7724c0b23..da63a313a 100644 --- a/src/core/file_sys/romfs_factory.h +++ b/src/core/file_sys/romfs_factory.h @@ -33,8 +33,8 @@ public: ~RomFSFactory(); void SetPackedUpdate(VirtualFile update_raw); - ResultVal<VirtualFile> OpenCurrentProcess(); - ResultVal<VirtualFile> Open(u64 title_id, StorageId storage, ContentRecordType type); + ResultVal<VirtualFile> OpenCurrentProcess() const; + ResultVal<VirtualFile> Open(u64 title_id, StorageId storage, ContentRecordType type) const; private: VirtualFile file; diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp index c63815332..f77cc02ac 100644 --- a/src/core/file_sys/savedata_factory.cpp +++ b/src/core/file_sys/savedata_factory.cpp @@ -71,7 +71,7 @@ SaveDataFactory::SaveDataFactory(VirtualDir save_directory) : dir(std::move(save SaveDataFactory::~SaveDataFactory() = default; ResultVal<VirtualDir> SaveDataFactory::Create(SaveDataSpaceId space, - const SaveDataDescriptor& meta) { + const SaveDataDescriptor& meta) const { PrintSaveDataDescriptorWarnings(meta); const auto save_directory = @@ -88,7 +88,8 @@ ResultVal<VirtualDir> SaveDataFactory::Create(SaveDataSpaceId space, return MakeResult<VirtualDir>(std::move(out)); } -ResultVal<VirtualDir> SaveDataFactory::Open(SaveDataSpaceId space, const SaveDataDescriptor& meta) { +ResultVal<VirtualDir> SaveDataFactory::Open(SaveDataSpaceId space, + const SaveDataDescriptor& meta) const { const auto save_directory = GetFullPath(space, meta.type, meta.title_id, meta.user_id, meta.save_id); @@ -165,7 +166,7 @@ SaveDataSize SaveDataFactory::ReadSaveDataSize(SaveDataType type, u64 title_id, } void SaveDataFactory::WriteSaveDataSize(SaveDataType type, u64 title_id, u128 user_id, - SaveDataSize new_value) { + SaveDataSize new_value) const { const auto path = GetFullPath(SaveDataSpaceId::NandUser, type, title_id, user_id, 0); const auto dir = GetOrCreateDirectoryRelative(this->dir, path); diff --git a/src/core/file_sys/savedata_factory.h b/src/core/file_sys/savedata_factory.h index 738038ee0..991e57aa1 100644 --- a/src/core/file_sys/savedata_factory.h +++ b/src/core/file_sys/savedata_factory.h @@ -64,8 +64,8 @@ public: explicit SaveDataFactory(VirtualDir dir); ~SaveDataFactory(); - ResultVal<VirtualDir> Create(SaveDataSpaceId space, const SaveDataDescriptor& meta); - ResultVal<VirtualDir> Open(SaveDataSpaceId space, const SaveDataDescriptor& meta); + ResultVal<VirtualDir> Create(SaveDataSpaceId space, const SaveDataDescriptor& meta) const; + ResultVal<VirtualDir> Open(SaveDataSpaceId space, const SaveDataDescriptor& meta) const; VirtualDir GetSaveDataSpaceDirectory(SaveDataSpaceId space) const; @@ -74,7 +74,8 @@ public: u128 user_id, u64 save_id); SaveDataSize ReadSaveDataSize(SaveDataType type, u64 title_id, u128 user_id) const; - void WriteSaveDataSize(SaveDataType type, u64 title_id, u128 user_id, SaveDataSize new_value); + void WriteSaveDataSize(SaveDataType type, u64 title_id, u128 user_id, + SaveDataSize new_value) const; private: VirtualDir dir; diff --git a/src/core/file_sys/sdmc_factory.cpp b/src/core/file_sys/sdmc_factory.cpp index 743e2e63a..5113a1ca6 100644 --- a/src/core/file_sys/sdmc_factory.cpp +++ b/src/core/file_sys/sdmc_factory.cpp @@ -21,7 +21,7 @@ SDMCFactory::SDMCFactory(VirtualDir dir_) SDMCFactory::~SDMCFactory() = default; -ResultVal<VirtualDir> SDMCFactory::Open() { +ResultVal<VirtualDir> SDMCFactory::Open() const { return MakeResult<VirtualDir>(dir); } diff --git a/src/core/file_sys/sdmc_factory.h b/src/core/file_sys/sdmc_factory.h index 164fd9435..42dc4e08a 100644 --- a/src/core/file_sys/sdmc_factory.h +++ b/src/core/file_sys/sdmc_factory.h @@ -19,7 +19,7 @@ public: explicit SDMCFactory(VirtualDir dir); ~SDMCFactory(); - ResultVal<VirtualDir> Open(); + ResultVal<VirtualDir> Open() const; VirtualDir GetSDMCContentDirectory() const; |