diff options
| author | 2016-10-18 17:27:51 +0800 | |
|---|---|---|
| committer | 2016-11-19 18:55:34 +0200 | |
| commit | 098778369962f8ec5eba6ccc91b2846c72cb0005 (patch) | |
| tree | a07c47167884f8837448efb9ff7de9fe3f5c0f61 /src/core/hle | |
| parent | FileSys: add SDMCArchive (diff) | |
| download | yuzu-098778369962f8ec5eba6ccc91b2846c72cb0005.tar.gz yuzu-098778369962f8ec5eba6ccc91b2846c72cb0005.tar.xz yuzu-098778369962f8ec5eba6ccc91b2846c72cb0005.zip | |
FileSys: add SDMCWriteOnlyArchive
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 | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/core/hle/result.h b/src/core/hle/result.h index a355f970a..f7356f9d8 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h | |||
| @@ -33,6 +33,7 @@ enum class ErrorDescription : u32 { | |||
| 33 | OutofRangeOrMisalignedAddress = | 33 | OutofRangeOrMisalignedAddress = |
| 34 | 513, // TODO(purpasmart): Check if this name fits its actual usage | 34 | 513, // TODO(purpasmart): Check if this name fits its actual usage |
| 35 | GPU_FirstInitialization = 519, | 35 | GPU_FirstInitialization = 519, |
| 36 | FS_InvalidReadFlag = 700, | ||
| 36 | FS_InvalidPath = 702, | 37 | FS_InvalidPath = 702, |
| 37 | FS_WriteBeyondEnd = 705, | 38 | FS_WriteBeyondEnd = 705, |
| 38 | FS_UnsupportedOpenFlags = 760, | 39 | FS_UnsupportedOpenFlags = 760, |
diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp index 891d7bc84..62cf2c249 100644 --- a/src/core/hle/service/fs/archive.cpp +++ b/src/core/hle/service/fs/archive.cpp | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include "core/file_sys/archive_savedata.h" | 18 | #include "core/file_sys/archive_savedata.h" |
| 19 | #include "core/file_sys/archive_savedatacheck.h" | 19 | #include "core/file_sys/archive_savedatacheck.h" |
| 20 | #include "core/file_sys/archive_sdmc.h" | 20 | #include "core/file_sys/archive_sdmc.h" |
| 21 | #include "core/file_sys/archive_sdmcwriteonly.h" | ||
| 21 | #include "core/file_sys/archive_systemsavedata.h" | 22 | #include "core/file_sys/archive_systemsavedata.h" |
| 22 | #include "core/file_sys/directory_backend.h" | 23 | #include "core/file_sys/directory_backend.h" |
| 23 | #include "core/file_sys/file_backend.h" | 24 | #include "core/file_sys/file_backend.h" |
| @@ -526,6 +527,13 @@ void RegisterArchiveTypes() { | |||
| 526 | LOG_ERROR(Service_FS, "Can't instantiate SDMC archive with path %s", | 527 | LOG_ERROR(Service_FS, "Can't instantiate SDMC archive with path %s", |
| 527 | sdmc_directory.c_str()); | 528 | sdmc_directory.c_str()); |
| 528 | 529 | ||
| 530 | auto sdmcwo_factory = std::make_unique<FileSys::ArchiveFactory_SDMCWriteOnly>(sdmc_directory); | ||
| 531 | if (sdmcwo_factory->Initialize()) | ||
| 532 | RegisterArchiveType(std::move(sdmcwo_factory), ArchiveIdCode::SDMCWriteOnly); | ||
| 533 | else | ||
| 534 | LOG_ERROR(Service_FS, "Can't instantiate SDMCWriteOnly archive with path %s", | ||
| 535 | sdmc_directory.c_str()); | ||
| 536 | |||
| 529 | // Create the SaveData archive | 537 | // Create the SaveData archive |
| 530 | auto savedata_factory = std::make_unique<FileSys::ArchiveFactory_SaveData>(sdmc_directory); | 538 | auto savedata_factory = std::make_unique<FileSys::ArchiveFactory_SaveData>(sdmc_directory); |
| 531 | RegisterArchiveType(std::move(savedata_factory), ArchiveIdCode::SaveData); | 539 | RegisterArchiveType(std::move(savedata_factory), ArchiveIdCode::SaveData); |