early-access version 1746

This commit is contained in:
pineappleEA
2021-06-03 05:23:59 +02:00
parent 25b27a361a
commit b9b72c8445
13 changed files with 197 additions and 86 deletions

View File

@@ -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

View File

@@ -104,9 +104,12 @@ public:
void WriteSaveDataSize(SaveDataType type, u64 title_id, u128 user_id,
SaveDataSize new_value) const;
void SetAutoCreate(bool state);
private:
VirtualDir dir;
Core::System& system;
bool auto_create{true};
};
} // namespace FileSys