Compare commits

...

2 Commits

Author SHA1 Message Date
Morph
5caf507fbc remove trailing whitespace
clang-format
2019-10-20 12:29:29 -04:00
Morph
2021420ea3 Re-introduces a workaround to create save data if it does not exist
We need to investigate what HW does when save data does not exist, because some games such as Breath of the Wild and Fire Emblem Warriors do not use the proper channels proper channels (EnsureSaveData, CreateSaveData) to create them. However, some games such as Super Mario Odyssey do.
2019-10-20 12:13:23 -04:00

View File

@@ -96,6 +96,16 @@ ResultVal<VirtualDir> SaveDataFactory::Open(SaveDataSpaceId space,
auto out = dir->GetDirectoryRelative(save_directory);
if (out == nullptr) {
// TODO (bunnei): This is a work-around to always create a save data directory if it does
// not already exist. This is a hack, as we do not understand how this works on hardware.
// Without a save data directory, many games will assert on boot. This should not have any
// bad side-effects.
// TODO: It seems that some games do not use proper channels (EnsureSaveData,
// CreateSaveData) to create save data. Need to investigate how HW deals with this.
out = dir->CreateDirectoryRelative(save_directory);
}
// Return an error if the save data doesn't actually exist.
if (out == nullptr) {
// TODO(Subv): Find out correct error code.