diff options
| author | 2018-02-27 10:23:35 -0500 | |
|---|---|---|
| committer | 2018-03-01 19:03:54 -0500 | |
| commit | 3209cff5307ab16044ccc22e6b922545aae8215d (patch) | |
| tree | d4a41d54e6d19a05fb449550d7230f3c909fa5d4 /src | |
| parent | Kernel: Store the program id in the Process class instead of the CodeSet class. (diff) | |
| download | yuzu-3209cff5307ab16044ccc22e6b922545aae8215d.tar.gz yuzu-3209cff5307ab16044ccc22e6b922545aae8215d.tar.xz yuzu-3209cff5307ab16044ccc22e6b922545aae8215d.zip | |
SaveData: Use the current titleid when opening the savedata archive.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/file_sys/savedata_factory.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp index 0df754e7c..4d83e100f 100644 --- a/src/core/file_sys/savedata_factory.cpp +++ b/src/core/file_sys/savedata_factory.cpp | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include "common/string_util.h" | 9 | #include "common/string_util.h" |
| 10 | #include "core/file_sys/disk_filesystem.h" | 10 | #include "core/file_sys/disk_filesystem.h" |
| 11 | #include "core/file_sys/savedata_factory.h" | 11 | #include "core/file_sys/savedata_factory.h" |
| 12 | #include "core/hle/kernel/process.h" | ||
| 12 | 13 | ||
| 13 | namespace FileSys { | 14 | namespace FileSys { |
| 14 | 15 | ||
| @@ -16,8 +17,8 @@ SaveData_Factory::SaveData_Factory(std::string nand_directory) | |||
| 16 | : nand_directory(std::move(nand_directory)) {} | 17 | : nand_directory(std::move(nand_directory)) {} |
| 17 | 18 | ||
| 18 | ResultVal<std::unique_ptr<FileSystemBackend>> SaveData_Factory::Open(const Path& path) { | 19 | ResultVal<std::unique_ptr<FileSystemBackend>> SaveData_Factory::Open(const Path& path) { |
| 19 | // TODO(Subv): Somehow obtain these values. | 20 | u64 title_id = Kernel::g_current_process->program_id; |
| 20 | u64 title_id = 0; | 21 | // TODO(Subv): Somehow obtain this value. |
| 21 | u32 user = 0; | 22 | u32 user = 0; |
| 22 | std::string save_directory = Common::StringFromFormat("%ssave/%016" PRIX64 "/%08X", | 23 | std::string save_directory = Common::StringFromFormat("%ssave/%016" PRIX64 "/%08X", |
| 23 | nand_directory.c_str(), title_id, user); | 24 | nand_directory.c_str(), title_id, user); |