summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorwwylele <wwylele@gmail.com>2016-10-18 11:27:51 +0200
committerwwylele <wwylele@gmail.com>2016-11-19 17:55:34 +0100
commit098778369962f8ec5eba6ccc91b2846c72cb0005 (patch)
treea07c47167884f8837448efb9ff7de9fe3f5c0f61 /src/core/hle
parentFileSys: add SDMCArchive (diff)
downloadyuzu-098778369962f8ec5eba6ccc91b2846c72cb0005.tar
yuzu-098778369962f8ec5eba6ccc91b2846c72cb0005.tar.gz
yuzu-098778369962f8ec5eba6ccc91b2846c72cb0005.tar.bz2
yuzu-098778369962f8ec5eba6ccc91b2846c72cb0005.tar.lz
yuzu-098778369962f8ec5eba6ccc91b2846c72cb0005.tar.xz
yuzu-098778369962f8ec5eba6ccc91b2846c72cb0005.tar.zst
yuzu-098778369962f8ec5eba6ccc91b2846c72cb0005.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/result.h1
-rw-r--r--src/core/hle/service/fs/archive.cpp8
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 {
OutofRangeOrMisalignedAddress =
513, // TODO(purpasmart): Check if this name fits its actual usage
GPU_FirstInitialization = 519,
+ FS_InvalidReadFlag = 700,
FS_InvalidPath = 702,
FS_WriteBeyondEnd = 705,
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 @@
#include "core/file_sys/archive_savedata.h"
#include "core/file_sys/archive_savedatacheck.h"
#include "core/file_sys/archive_sdmc.h"
+#include "core/file_sys/archive_sdmcwriteonly.h"
#include "core/file_sys/archive_systemsavedata.h"
#include "core/file_sys/directory_backend.h"
#include "core/file_sys/file_backend.h"
@@ -526,6 +527,13 @@ void RegisterArchiveTypes() {
LOG_ERROR(Service_FS, "Can't instantiate SDMC archive with path %s",
sdmc_directory.c_str());
+ auto sdmcwo_factory = std::make_unique<FileSys::ArchiveFactory_SDMCWriteOnly>(sdmc_directory);
+ if (sdmcwo_factory->Initialize())
+ RegisterArchiveType(std::move(sdmcwo_factory), ArchiveIdCode::SDMCWriteOnly);
+ else
+ LOG_ERROR(Service_FS, "Can't instantiate SDMCWriteOnly archive with path %s",
+ sdmc_directory.c_str());
+
// Create the SaveData archive
auto savedata_factory = std::make_unique<FileSys::ArchiveFactory_SaveData>(sdmc_directory);
RegisterArchiveType(std::move(savedata_factory), ArchiveIdCode::SaveData);