diff options
author | Chloe <25727384+ogniK5377@users.noreply.github.com> | 2021-06-03 02:46:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-03 02:46:29 +0200 |
commit | c4c256f56ad4db7064aa2a2bc769f57efcbd5e38 (patch) | |
tree | 2aeb68fb1c51198071a4b340db69f9f9d453729d /src/core/hle/service | |
parent | Merge pull request #6308 from Morph1984/result (diff) | |
download | yuzu-c4c256f56ad4db7064aa2a2bc769f57efcbd5e38.tar yuzu-c4c256f56ad4db7064aa2a2bc769f57efcbd5e38.tar.gz yuzu-c4c256f56ad4db7064aa2a2bc769f57efcbd5e38.tar.bz2 yuzu-c4c256f56ad4db7064aa2a2bc769f57efcbd5e38.tar.lz yuzu-c4c256f56ad4db7064aa2a2bc769f57efcbd5e38.tar.xz yuzu-c4c256f56ad4db7064aa2a2bc769f57efcbd5e38.tar.zst yuzu-c4c256f56ad4db7064aa2a2bc769f57efcbd5e38.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/filesystem/filesystem.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/service/filesystem/filesystem.h | 2 | ||||
-rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 11 | ||||
-rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.h | 1 |
4 files changed, 17 insertions, 1 deletions
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index 4a1908bcb..3c16fe6c7 100644 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp @@ -721,6 +721,10 @@ FileSys::VirtualDir FileSystemController::GetBCATDirectory(u64 title_id) const { return bis_factory->GetBCATDirectory(title_id); } +void FileSystemController::SetAutoSaveDataCreation(bool enable) { + save_data_factory->SetAutoCreate(enable); +} + void FileSystemController::CreateFactories(FileSys::VfsFilesystem& vfs, bool overwrite) { if (overwrite) { bis_factory = nullptr; diff --git a/src/core/hle/service/filesystem/filesystem.h b/src/core/hle/service/filesystem/filesystem.h index 7102d3f9a..b6b1b9220 100644 --- a/src/core/hle/service/filesystem/filesystem.h +++ b/src/core/hle/service/filesystem/filesystem.h @@ -120,6 +120,8 @@ public: FileSys::VirtualDir GetBCATDirectory(u64 title_id) const; + void SetAutoSaveDataCreation(bool enable); + // Creates the SaveData, SDMC, and BIS Factories. Should be called once and before any function // above is called. void CreateFactories(FileSys::VfsFilesystem& vfs, bool overwrite = true); diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index d9e8020b4..52dc73cf8 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -764,7 +764,7 @@ FSP_SRV::FSP_SRV(Core::System& system_) {1000, nullptr, "SetBisRootForHost"}, {1001, nullptr, "SetSaveDataSize"}, {1002, nullptr, "SetSaveDataRootPath"}, - {1003, nullptr, "DisableAutoSaveDataCreation"}, + {1003, &FSP_SRV::DisableAutoSaveDataCreation, "DisableAutoSaveDataCreation"}, {1004, &FSP_SRV::SetGlobalAccessLogMode, "SetGlobalAccessLogMode"}, {1005, &FSP_SRV::GetGlobalAccessLogMode, "GetGlobalAccessLogMode"}, {1006, &FSP_SRV::OutputAccessLogToSdCard, "OutputAccessLogToSdCard"}, @@ -1030,6 +1030,15 @@ void FSP_SRV::OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx) { rb.PushIpcInterface<IStorage>(std::move(storage)); } +void FSP_SRV::DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx) { + LOG_DEBUG(Service_FS, "called"); + + fsc.SetAutoSaveDataCreation(false); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); +} + void FSP_SRV::SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { IPC::RequestParser rp{ctx}; log_mode = rp.PopEnum<LogMode>(); diff --git a/src/core/hle/service/filesystem/fsp_srv.h b/src/core/hle/service/filesystem/fsp_srv.h index b01b924eb..ff7455a20 100644 --- a/src/core/hle/service/filesystem/fsp_srv.h +++ b/src/core/hle/service/filesystem/fsp_srv.h @@ -50,6 +50,7 @@ private: void OpenDataStorageByDataId(Kernel::HLERequestContext& ctx); void OpenPatchDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx); void OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx); + void DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx); void SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx); void GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx); void OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx); |