summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/file_sys/savedata_factory.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp
index f3def93ab..adfd2c1a4 100644
--- a/src/core/file_sys/savedata_factory.cpp
+++ b/src/core/file_sys/savedata_factory.cpp
@@ -57,7 +57,8 @@ void PrintSaveDataDescriptorWarnings(SaveDataDescriptor meta) {
57bool ShouldSaveDataBeAutomaticallyCreated(SaveDataSpaceId space, const SaveDataDescriptor& desc) { 57bool ShouldSaveDataBeAutomaticallyCreated(SaveDataSpaceId space, const SaveDataDescriptor& desc) {
58 return desc.type == SaveDataType::CacheStorage || desc.type == SaveDataType::TemporaryStorage || 58 return desc.type == SaveDataType::CacheStorage || desc.type == SaveDataType::TemporaryStorage ||
59 (space == SaveDataSpaceId::NandUser && ///< Normal Save Data -- Current Title & User 59 (space == SaveDataSpaceId::NandUser && ///< Normal Save Data -- Current Title & User
60 desc.type == SaveDataType::SaveData && desc.title_id == 0 && desc.save_id == 0); 60 (desc.type == SaveDataType::SaveData || desc.type == SaveDataType::DeviceSaveData) &&
61 desc.title_id == 0 && desc.save_id == 0);
61} 62}
62 63
63} // Anonymous namespace 64} // Anonymous namespace
@@ -139,8 +140,10 @@ std::string SaveDataFactory::GetFullPath(SaveDataSpaceId space, SaveDataType typ
139 u128 user_id, u64 save_id) { 140 u128 user_id, u64 save_id) {
140 // According to switchbrew, if a save is of type SaveData and the title id field is 0, it should 141 // According to switchbrew, if a save is of type SaveData and the title id field is 0, it should
141 // be interpreted as the title id of the current process. 142 // be interpreted as the title id of the current process.
142 if (type == SaveDataType::SaveData && title_id == 0) { 143 if (type == SaveDataType::SaveData || type == SaveDataType::DeviceSaveData) {
143 title_id = Core::System::GetInstance().CurrentProcess()->GetTitleID(); 144 if (title_id == 0) {
145 title_id = Core::System::GetInstance().CurrentProcess()->GetTitleID();
146 }
144 } 147 }
145 148
146 std::string out = GetSaveDataSpaceIdPath(space); 149 std::string out = GetSaveDataSpaceIdPath(space);