Skip to content

Commit

Permalink
Merge pull request #545 from Kronos2308/simple-sd-save-flag
Browse files Browse the repository at this point in the history
simple sd_save flag
  • Loading branch information
SciresM authored May 17, 2019
2 parents 13a1566 + bbb658a commit 6cc2918
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions stratosphere/ams_mitm/source/fs_mitm/fsmitm_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,13 @@ Result FsMitmService::OpenFileSystemWithId(Out<std::shared_ptr<IFileSystemInterf

Result FsMitmService::OpenSaveDataFileSystem(Out<std::shared_ptr<IFileSystemInterface>> out_fs, u8 space_id, FsSave save_struct) {
bool should_redirect_saves = false;
const bool has_redirect_save_flags = Utils::HasFlag(this->title_id, "redirect_save");
if (R_FAILED(Utils::GetSettingsItemBooleanValue("atmosphere", "fsmitm_redirect_saves_to_sd", &should_redirect_saves))) {
return ResultAtmosphereMitmShouldForwardToSession;
}

/* For now, until we're sure this is robust, only intercept normal savedata. */
if (!should_redirect_saves || save_struct.SaveDataType != FsSaveDataType_SaveData) {
/* For now, until we're sure this is robust, only intercept normal savedata , check if flag exist*/
if (!has_redirect_save_flags || !should_redirect_saves || save_struct.SaveDataType != FsSaveDataType_SaveData) {
return ResultAtmosphereMitmShouldForwardToSession;
}

Expand Down Expand Up @@ -430,4 +431,4 @@ Result FsMitmService::OpenDataStorageByDataId(Out<std::shared_ptr<IStorageInterf
}

return rc;
}
}

0 comments on commit 6cc2918

Please sign in to comment.