diff options
| author | 2016-12-07 10:17:02 -0500 | |
|---|---|---|
| committer | 2016-12-07 10:17:02 -0500 | |
| commit | 8d529a5cda86f6c59f21829d8a15deb5586c1c8d (patch) | |
| tree | 06d0905c9fe39743cad4f71d9dd95321226cc61c /src/core/hle/service/fs | |
| parent | Implement Frame rate limiter (#2223) (diff) | |
| parent | FileSys: Implement OtherSaveData (diff) | |
| download | yuzu-8d529a5cda86f6c59f21829d8a15deb5586c1c8d.tar.gz yuzu-8d529a5cda86f6c59f21829d8a15deb5586c1c8d.tar.xz yuzu-8d529a5cda86f6c59f21829d8a15deb5586c1c8d.zip | |
Merge pull request #2232 from wwylele/other-save
FS: implement archives for other game save data
Diffstat (limited to 'src/core/hle/service/fs')
| -rw-r--r-- | src/core/hle/service/fs/archive.cpp | 12 | ||||
| -rw-r--r-- | src/core/hle/service/fs/archive.h | 4 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp index 4c29784e8..bef75f5df 100644 --- a/src/core/hle/service/fs/archive.cpp +++ b/src/core/hle/service/fs/archive.cpp | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include "core/file_sys/archive_backend.h" | 16 | #include "core/file_sys/archive_backend.h" |
| 17 | #include "core/file_sys/archive_extsavedata.h" | 17 | #include "core/file_sys/archive_extsavedata.h" |
| 18 | #include "core/file_sys/archive_ncch.h" | 18 | #include "core/file_sys/archive_ncch.h" |
| 19 | #include "core/file_sys/archive_other_savedata.h" | ||
| 19 | #include "core/file_sys/archive_savedata.h" | 20 | #include "core/file_sys/archive_savedata.h" |
| 20 | #include "core/file_sys/archive_sdmc.h" | 21 | #include "core/file_sys/archive_sdmc.h" |
| 21 | #include "core/file_sys/archive_sdmcwriteonly.h" | 22 | #include "core/file_sys/archive_sdmcwriteonly.h" |
| @@ -535,8 +536,17 @@ void RegisterArchiveTypes() { | |||
| 535 | sdmc_directory.c_str()); | 536 | sdmc_directory.c_str()); |
| 536 | 537 | ||
| 537 | // Create the SaveData archive | 538 | // Create the SaveData archive |
| 538 | auto savedata_factory = std::make_unique<FileSys::ArchiveFactory_SaveData>(sdmc_directory); | 539 | auto sd_savedata_source = std::make_shared<FileSys::ArchiveSource_SDSaveData>(sdmc_directory); |
| 540 | auto savedata_factory = std::make_unique<FileSys::ArchiveFactory_SaveData>(sd_savedata_source); | ||
| 539 | RegisterArchiveType(std::move(savedata_factory), ArchiveIdCode::SaveData); | 541 | RegisterArchiveType(std::move(savedata_factory), ArchiveIdCode::SaveData); |
| 542 | auto other_savedata_permitted_factory = | ||
| 543 | std::make_unique<FileSys::ArchiveFactory_OtherSaveDataPermitted>(sd_savedata_source); | ||
| 544 | RegisterArchiveType(std::move(other_savedata_permitted_factory), | ||
| 545 | ArchiveIdCode::OtherSaveDataPermitted); | ||
| 546 | auto other_savedata_general_factory = | ||
| 547 | std::make_unique<FileSys::ArchiveFactory_OtherSaveDataGeneral>(sd_savedata_source); | ||
| 548 | RegisterArchiveType(std::move(other_savedata_general_factory), | ||
| 549 | ArchiveIdCode::OtherSaveDataGeneral); | ||
| 540 | 550 | ||
| 541 | auto extsavedata_factory = | 551 | auto extsavedata_factory = |
| 542 | std::make_unique<FileSys::ArchiveFactory_ExtSaveData>(sdmc_directory, false); | 552 | std::make_unique<FileSys::ArchiveFactory_ExtSaveData>(sdmc_directory, false); |
diff --git a/src/core/hle/service/fs/archive.h b/src/core/hle/service/fs/archive.h index 21ed9717b..87089bd92 100644 --- a/src/core/hle/service/fs/archive.h +++ b/src/core/hle/service/fs/archive.h | |||
| @@ -34,10 +34,12 @@ enum class ArchiveIdCode : u32 { | |||
| 34 | SDMC = 0x00000009, | 34 | SDMC = 0x00000009, |
| 35 | SDMCWriteOnly = 0x0000000A, | 35 | SDMCWriteOnly = 0x0000000A, |
| 36 | NCCH = 0x2345678A, | 36 | NCCH = 0x2345678A, |
| 37 | OtherSaveDataGeneral = 0x567890B2, | ||
| 38 | OtherSaveDataPermitted = 0x567890B4, | ||
| 37 | }; | 39 | }; |
| 38 | 40 | ||
| 39 | /// Media types for the archives | 41 | /// Media types for the archives |
| 40 | enum class MediaType : u32 { NAND = 0, SDMC = 1 }; | 42 | enum class MediaType : u32 { NAND = 0, SDMC = 1, GameCard = 2 }; |
| 41 | 43 | ||
| 42 | typedef u64 ArchiveHandle; | 44 | typedef u64 ArchiveHandle; |
| 43 | 45 | ||