diff options
| author | 2016-11-29 00:52:11 +0200 | |
|---|---|---|
| committer | 2016-11-29 23:50:00 +0200 | |
| commit | 589b6427909dfc7a4b5ee1a64cb86d38d459b0f3 (patch) | |
| tree | b6ad186dd5d10ef0aa5db9153962a1c18060f417 /src/core/hle | |
| parent | FS: add missing MediaType (diff) | |
| download | yuzu-589b6427909dfc7a4b5ee1a64cb86d38d459b0f3.tar.gz yuzu-589b6427909dfc7a4b5ee1a64cb86d38d459b0f3.tar.xz yuzu-589b6427909dfc7a4b5ee1a64cb86d38d459b0f3.zip | |
FileSys: Implement OtherSaveData
Diffstat (limited to 'src/core/hle')
| -rw-r--r-- | src/core/hle/result.h | 1 | ||||
| -rw-r--r-- | src/core/hle/service/fs/archive.cpp | 9 | ||||
| -rw-r--r-- | src/core/hle/service/fs/archive.h | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/core/hle/result.h b/src/core/hle/result.h index f7356f9d8..8d29117a8 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h | |||
| @@ -22,6 +22,7 @@ enum class ErrorDescription : u32 { | |||
| 22 | FS_ArchiveNotMounted = 101, | 22 | FS_ArchiveNotMounted = 101, |
| 23 | FS_FileNotFound = 112, | 23 | FS_FileNotFound = 112, |
| 24 | FS_PathNotFound = 113, | 24 | FS_PathNotFound = 113, |
| 25 | FS_GameCardNotInserted = 141, | ||
| 25 | FS_NotFound = 120, | 26 | FS_NotFound = 120, |
| 26 | FS_FileAlreadyExists = 180, | 27 | FS_FileAlreadyExists = 180, |
| 27 | FS_DirectoryAlreadyExists = 185, | 28 | FS_DirectoryAlreadyExists = 185, |
diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp index a067e9262..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" |
| @@ -538,6 +539,14 @@ void RegisterArchiveTypes() { | |||
| 538 | auto sd_savedata_source = std::make_shared<FileSys::ArchiveSource_SDSaveData>(sdmc_directory); | 539 | auto sd_savedata_source = std::make_shared<FileSys::ArchiveSource_SDSaveData>(sdmc_directory); |
| 539 | auto savedata_factory = std::make_unique<FileSys::ArchiveFactory_SaveData>(sd_savedata_source); | 540 | auto savedata_factory = std::make_unique<FileSys::ArchiveFactory_SaveData>(sd_savedata_source); |
| 540 | 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); | ||
| 541 | 550 | ||
| 542 | auto extsavedata_factory = | 551 | auto extsavedata_factory = |
| 543 | 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 d0220db17..87089bd92 100644 --- a/src/core/hle/service/fs/archive.h +++ b/src/core/hle/service/fs/archive.h | |||
| @@ -34,6 +34,8 @@ 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 |