diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-10-28 19:56:43 +0100 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-10-29 18:54:38 +0100 |
commit | df264d2ccb39a4d7ffd4efd3158e66db3aa6952a (patch) | |
tree | c934e298ce1931b90045ea18eee68551b7f744c7 /src/core/hle/service | |
parent | loader/nro: Call RegisterRomFS from Load (diff) | |
download | yuzu-df264d2ccb39a4d7ffd4efd3158e66db3aa6952a.tar yuzu-df264d2ccb39a4d7ffd4efd3158e66db3aa6952a.tar.gz yuzu-df264d2ccb39a4d7ffd4efd3158e66db3aa6952a.tar.bz2 yuzu-df264d2ccb39a4d7ffd4efd3158e66db3aa6952a.tar.lz yuzu-df264d2ccb39a4d7ffd4efd3158e66db3aa6952a.tar.xz yuzu-df264d2ccb39a4d7ffd4efd3158e66db3aa6952a.tar.zst yuzu-df264d2ccb39a4d7ffd4efd3158e66db3aa6952a.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/filesystem/filesystem.cpp | 10 | ||||
-rw-r--r-- | src/core/hle/service/filesystem/filesystem.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index e32a7c48e..ea8fd965a 100644 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp @@ -309,6 +309,16 @@ ResultVal<FileSys::VirtualDir> OpenSaveData(FileSys::SaveDataSpaceId space, return save_data_factory->Open(space, save_struct); } +ResultVal<FileSys::VirtualDir> OpenSaveDataSpace(FileSys::SaveDataSpaceId space) { + LOG_TRACE(Service_FS, "Opening Save Data Space for space_id={:01X}", static_cast<u8>(space)); + + if (save_data_factory == nullptr) { + return ResultCode(ErrorModule::FS, FileSys::ErrCodes::TitleNotFound); + } + + return MakeResult(save_data_factory->GetSaveDataSpaceDirectory(space)); +} + ResultVal<FileSys::VirtualDir> OpenSDMC() { LOG_TRACE(Service_FS, "Opening SDMC"); diff --git a/src/core/hle/service/filesystem/filesystem.h b/src/core/hle/service/filesystem/filesystem.h index 6ca5c5636..2cbb70c87 100644 --- a/src/core/hle/service/filesystem/filesystem.h +++ b/src/core/hle/service/filesystem/filesystem.h @@ -45,6 +45,7 @@ ResultVal<FileSys::VirtualFile> OpenRomFS(u64 title_id, FileSys::StorageId stora FileSys::ContentRecordType type); ResultVal<FileSys::VirtualDir> OpenSaveData(FileSys::SaveDataSpaceId space, FileSys::SaveDataDescriptor save_struct); +ResultVal<FileSys::VirtualDir> OpenSaveDataSpace(FileSys::SaveDataSpaceId space); ResultVal<FileSys::VirtualDir> OpenSDMC(); std::unique_ptr<FileSys::RegisteredCacheUnion> GetUnionContents(); |