summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/savedata_factory.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-05-16 18:39:58 +0200
committerGitHub <noreply@github.com>2020-05-16 18:39:58 +0200
commit65010607b7a474e677360a5a465a3169fec41ba0 (patch)
tree1e101dc9ecbfcfdf1da6f848e002dc21df0b3a96 /src/core/file_sys/savedata_factory.cpp
parentMerge pull request #3945 from ogniK5377/nvflinger-pixformat (diff)
parentservice: fsp_srv: Stub implementation of OpenMultiCommitManager. (diff)
downloadyuzu-65010607b7a474e677360a5a465a3169fec41ba0.tar
yuzu-65010607b7a474e677360a5a465a3169fec41ba0.tar.gz
yuzu-65010607b7a474e677360a5a465a3169fec41ba0.tar.bz2
yuzu-65010607b7a474e677360a5a465a3169fec41ba0.tar.lz
yuzu-65010607b7a474e677360a5a465a3169fec41ba0.tar.xz
yuzu-65010607b7a474e677360a5a465a3169fec41ba0.tar.zst
yuzu-65010607b7a474e677360a5a465a3169fec41ba0.zip
Diffstat (limited to '')
-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) {
bool ShouldSaveDataBeAutomaticallyCreated(SaveDataSpaceId space, const SaveDataDescriptor& desc) {
return desc.type == SaveDataType::CacheStorage || desc.type == SaveDataType::TemporaryStorage ||
(space == SaveDataSpaceId::NandUser && ///< Normal Save Data -- Current Title & User
- desc.type == SaveDataType::SaveData && desc.title_id == 0 && desc.save_id == 0);
+ (desc.type == SaveDataType::SaveData || desc.type == SaveDataType::DeviceSaveData) &&
+ desc.title_id == 0 && desc.save_id == 0);
}
} // Anonymous namespace
@@ -139,8 +140,10 @@ std::string SaveDataFactory::GetFullPath(SaveDataSpaceId space, SaveDataType typ
u128 user_id, u64 save_id) {
// According to switchbrew, if a save is of type SaveData and the title id field is 0, it should
// be interpreted as the title id of the current process.
- if (type == SaveDataType::SaveData && title_id == 0) {
- title_id = Core::System::GetInstance().CurrentProcess()->GetTitleID();
+ if (type == SaveDataType::SaveData || type == SaveDataType::DeviceSaveData) {
+ if (title_id == 0) {
+ title_id = Core::System::GetInstance().CurrentProcess()->GetTitleID();
+ }
}
std::string out = GetSaveDataSpaceIdPath(space);