diff options
| author | 2021-06-03 10:46:29 +1000 | |
|---|---|---|
| committer | 2021-06-02 17:46:29 -0700 | |
| commit | c4c256f56ad4db7064aa2a2bc769f57efcbd5e38 (patch) | |
| tree | 2aeb68fb1c51198071a4b340db69f9f9d453729d /src/core/hle | |
| parent | Merge pull request #6308 from Morph1984/result (diff) | |
| download | yuzu-c4c256f56ad4db7064aa2a2bc769f57efcbd5e38.tar.gz yuzu-c4c256f56ad4db7064aa2a2bc769f57efcbd5e38.tar.xz yuzu-c4c256f56ad4db7064aa2a2bc769f57efcbd5e38.zip | |
fspsrv: Implement DisableAutoSaveDataCreation (#6355)
- Used by Mii Edit
Diffstat (limited to 'src/core/hle')
| -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 { | |||
| 721 | return bis_factory->GetBCATDirectory(title_id); | 721 | return bis_factory->GetBCATDirectory(title_id); |
| 722 | } | 722 | } |
| 723 | 723 | ||
| 724 | void FileSystemController::SetAutoSaveDataCreation(bool enable) { | ||
| 725 | save_data_factory->SetAutoCreate(enable); | ||
| 726 | } | ||
| 727 | |||
| 724 | void FileSystemController::CreateFactories(FileSys::VfsFilesystem& vfs, bool overwrite) { | 728 | void FileSystemController::CreateFactories(FileSys::VfsFilesystem& vfs, bool overwrite) { |
| 725 | if (overwrite) { | 729 | if (overwrite) { |
| 726 | bis_factory = nullptr; | 730 | 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: | |||
| 120 | 120 | ||
| 121 | FileSys::VirtualDir GetBCATDirectory(u64 title_id) const; | 121 | FileSys::VirtualDir GetBCATDirectory(u64 title_id) const; |
| 122 | 122 | ||
| 123 | void SetAutoSaveDataCreation(bool enable); | ||
| 124 | |||
| 123 | // Creates the SaveData, SDMC, and BIS Factories. Should be called once and before any function | 125 | // Creates the SaveData, SDMC, and BIS Factories. Should be called once and before any function |
| 124 | // above is called. | 126 | // above is called. |
| 125 | void CreateFactories(FileSys::VfsFilesystem& vfs, bool overwrite = true); | 127 | 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_) | |||
| 764 | {1000, nullptr, "SetBisRootForHost"}, | 764 | {1000, nullptr, "SetBisRootForHost"}, |
| 765 | {1001, nullptr, "SetSaveDataSize"}, | 765 | {1001, nullptr, "SetSaveDataSize"}, |
| 766 | {1002, nullptr, "SetSaveDataRootPath"}, | 766 | {1002, nullptr, "SetSaveDataRootPath"}, |
| 767 | {1003, nullptr, "DisableAutoSaveDataCreation"}, | 767 | {1003, &FSP_SRV::DisableAutoSaveDataCreation, "DisableAutoSaveDataCreation"}, |
| 768 | {1004, &FSP_SRV::SetGlobalAccessLogMode, "SetGlobalAccessLogMode"}, | 768 | {1004, &FSP_SRV::SetGlobalAccessLogMode, "SetGlobalAccessLogMode"}, |
| 769 | {1005, &FSP_SRV::GetGlobalAccessLogMode, "GetGlobalAccessLogMode"}, | 769 | {1005, &FSP_SRV::GetGlobalAccessLogMode, "GetGlobalAccessLogMode"}, |
| 770 | {1006, &FSP_SRV::OutputAccessLogToSdCard, "OutputAccessLogToSdCard"}, | 770 | {1006, &FSP_SRV::OutputAccessLogToSdCard, "OutputAccessLogToSdCard"}, |
| @@ -1030,6 +1030,15 @@ void FSP_SRV::OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx) { | |||
| 1030 | rb.PushIpcInterface<IStorage>(std::move(storage)); | 1030 | rb.PushIpcInterface<IStorage>(std::move(storage)); |
| 1031 | } | 1031 | } |
| 1032 | 1032 | ||
| 1033 | void FSP_SRV::DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx) { | ||
| 1034 | LOG_DEBUG(Service_FS, "called"); | ||
| 1035 | |||
| 1036 | fsc.SetAutoSaveDataCreation(false); | ||
| 1037 | |||
| 1038 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 1039 | rb.Push(RESULT_SUCCESS); | ||
| 1040 | } | ||
| 1041 | |||
| 1033 | void FSP_SRV::SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { | 1042 | void FSP_SRV::SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx) { |
| 1034 | IPC::RequestParser rp{ctx}; | 1043 | IPC::RequestParser rp{ctx}; |
| 1035 | log_mode = rp.PopEnum<LogMode>(); | 1044 | 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: | |||
| 50 | void OpenDataStorageByDataId(Kernel::HLERequestContext& ctx); | 50 | void OpenDataStorageByDataId(Kernel::HLERequestContext& ctx); |
| 51 | void OpenPatchDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx); | 51 | void OpenPatchDataStorageByCurrentProcess(Kernel::HLERequestContext& ctx); |
| 52 | void OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx); | 52 | void OpenDataStorageWithProgramIndex(Kernel::HLERequestContext& ctx); |
| 53 | void DisableAutoSaveDataCreation(Kernel::HLERequestContext& ctx); | ||
| 53 | void SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx); | 54 | void SetGlobalAccessLogMode(Kernel::HLERequestContext& ctx); |
| 54 | void GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx); | 55 | void GetGlobalAccessLogMode(Kernel::HLERequestContext& ctx); |
| 55 | void OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx); | 56 | void OutputAccessLogToSdCard(Kernel::HLERequestContext& ctx); |