mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-11 06:26:41 +00:00
simple sd_save flag
something that allows you to decide which title to redirect games saves and which does not
This commit is contained in:
parent
bfd4d41834
commit
674175e1c6
1 changed files with 6 additions and 1 deletions
|
@ -162,11 +162,16 @@ Result FsMitmService::OpenFileSystemWithId(Out<std::shared_ptr<IFileSystemInterf
|
||||||
}
|
}
|
||||||
|
|
||||||
Result FsMitmService::OpenSaveDataFileSystem(Out<std::shared_ptr<IFileSystemInterface>> out_fs, u8 space_id, FsSave save_struct) {
|
Result FsMitmService::OpenSaveDataFileSystem(Out<std::shared_ptr<IFileSystemInterface>> out_fs, u8 space_id, FsSave save_struct) {
|
||||||
|
const bool has_sd_save_flags = Utils::HasFlag(this->title_id, "sd_save");
|
||||||
bool should_redirect_saves = false;
|
bool should_redirect_saves = false;
|
||||||
if (R_FAILED(Utils::GetSettingsItemBooleanValue("atmosphere", "fsmitm_redirect_saves_to_sd", &should_redirect_saves))) {
|
if (R_FAILED(Utils::GetSettingsItemBooleanValue("atmosphere", "fsmitm_redirect_saves_to_sd", &should_redirect_saves))) {
|
||||||
return ResultAtmosphereMitmShouldForwardToSession;
|
return ResultAtmosphereMitmShouldForwardToSession;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!has_sd_save_flags) {
|
||||||
|
should_redirect_saves = false;
|
||||||
|
}
|
||||||
|
|
||||||
/* For now, until we're sure this is robust, only intercept normal savedata. */
|
/* For now, until we're sure this is robust, only intercept normal savedata. */
|
||||||
if (!should_redirect_saves || save_struct.SaveDataType != FsSaveDataType_SaveData) {
|
if (!should_redirect_saves || save_struct.SaveDataType != FsSaveDataType_SaveData) {
|
||||||
return ResultAtmosphereMitmShouldForwardToSession;
|
return ResultAtmosphereMitmShouldForwardToSession;
|
||||||
|
|
Loading…
Reference in a new issue