diff options
| author | Chloe <25727384+ogniK5377@users.noreply.github.com> | 2021-06-03 10:46:29 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-02 17:46:29 -0700 |
| commit | 8eb5da9a7c1e09be4ab826da452b45753eb9d4cf (patch) | |
| tree | 2aeb68fb1c51198071a4b340db69f9f9d453729d /src/core/file_sys/savedata_factory.cpp | |
| parent | 3a3c6b2446a3fc7af58a788ac9ffc7d471f645b8 (diff) | |
fspsrv: Implement DisableAutoSaveDataCreation (#6355)
- Used by Mii Edit
Diffstat (limited to 'src/core/file_sys/savedata_factory.cpp')
| -rw-r--r-- | src/core/file_sys/savedata_factory.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp index 6c36859271..b5254dd75f 100644 --- a/src/core/file_sys/savedata_factory.cpp +++ b/src/core/file_sys/savedata_factory.cpp @@ -105,7 +105,7 @@ ResultVal<VirtualDir> SaveDataFactory::Open(SaveDataSpaceId space, auto out = dir->GetDirectoryRelative(save_directory); - if (out == nullptr && ShouldSaveDataBeAutomaticallyCreated(space, meta)) { + if (out == nullptr && (ShouldSaveDataBeAutomaticallyCreated(space, meta) && auto_create)) { return Create(space, meta); } @@ -199,4 +199,8 @@ void SaveDataFactory::WriteSaveDataSize(SaveDataType type, u64 title_id, u128 us size_file->WriteObject(new_value); } +void SaveDataFactory::SetAutoCreate(bool state) { + auto_create = state; +} + } // namespace FileSys |
