summaryrefslogtreecommitdiff
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorGravatar Zach Hilman2019-10-06 20:47:48 -0400
committerGravatar GitHub2019-10-06 20:47:48 -0400
commit5326d3cb3a75a1f7df531e47cf0acadc3c5db32b (patch)
tree83697ca2dba90470ba59eff2f56e71769b03e3d9 /src/core/file_sys
parentMerge pull request #2952 from lioncash/warning (diff)
parentcore/core: Remove unused header (diff)
downloadyuzu-5326d3cb3a75a1f7df531e47cf0acadc3c5db32b.tar.gz
yuzu-5326d3cb3a75a1f7df531e47cf0acadc3c5db32b.tar.xz
yuzu-5326d3cb3a75a1f7df531e47cf0acadc3c5db32b.zip
Merge pull request #2951 from lioncash/global
core: Remove Core::CurrentProcess()
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/romfs_factory.cpp4
-rw-r--r--src/core/file_sys/romfs_factory.h2
-rw-r--r--src/core/file_sys/savedata_factory.cpp5
3 files changed, 6 insertions, 5 deletions
diff --git a/src/core/file_sys/romfs_factory.cpp b/src/core/file_sys/romfs_factory.cpp
index 84cd4684c..4bd2e6183 100644
--- a/src/core/file_sys/romfs_factory.cpp
+++ b/src/core/file_sys/romfs_factory.cpp
@@ -35,11 +35,11 @@ void RomFSFactory::SetPackedUpdate(VirtualFile update_raw) {
35 this->update_raw = std::move(update_raw); 35 this->update_raw = std::move(update_raw);
36} 36}
37 37
38ResultVal<VirtualFile> RomFSFactory::OpenCurrentProcess() const { 38ResultVal<VirtualFile> RomFSFactory::OpenCurrentProcess(u64 current_process_title_id) const {
39 if (!updatable) 39 if (!updatable)
40 return MakeResult<VirtualFile>(file); 40 return MakeResult<VirtualFile>(file);
41 41
42 const PatchManager patch_manager(Core::CurrentProcess()->GetTitleID()); 42 const PatchManager patch_manager(current_process_title_id);
43 return MakeResult<VirtualFile>( 43 return MakeResult<VirtualFile>(
44 patch_manager.PatchRomFS(file, ivfc_offset, ContentRecordType::Program, update_raw)); 44 patch_manager.PatchRomFS(file, ivfc_offset, ContentRecordType::Program, update_raw));
45} 45}
diff --git a/src/core/file_sys/romfs_factory.h b/src/core/file_sys/romfs_factory.h
index da63a313a..c5d40285c 100644
--- a/src/core/file_sys/romfs_factory.h
+++ b/src/core/file_sys/romfs_factory.h
@@ -33,7 +33,7 @@ public:
33 ~RomFSFactory(); 33 ~RomFSFactory();
34 34
35 void SetPackedUpdate(VirtualFile update_raw); 35 void SetPackedUpdate(VirtualFile update_raw);
36 ResultVal<VirtualFile> OpenCurrentProcess() const; 36 ResultVal<VirtualFile> OpenCurrentProcess(u64 current_process_title_id) const;
37 ResultVal<VirtualFile> Open(u64 title_id, StorageId storage, ContentRecordType type) const; 37 ResultVal<VirtualFile> Open(u64 title_id, StorageId storage, ContentRecordType type) const;
38 38
39private: 39private:
diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp
index f77cc02ac..fc8755c78 100644
--- a/src/core/file_sys/savedata_factory.cpp
+++ b/src/core/file_sys/savedata_factory.cpp
@@ -127,8 +127,9 @@ std::string SaveDataFactory::GetFullPath(SaveDataSpaceId space, SaveDataType typ
127 u128 user_id, u64 save_id) { 127 u128 user_id, u64 save_id) {
128 // According to switchbrew, if a save is of type SaveData and the title id field is 0, it should 128 // According to switchbrew, if a save is of type SaveData and the title id field is 0, it should
129 // be interpreted as the title id of the current process. 129 // be interpreted as the title id of the current process.
130 if (type == SaveDataType::SaveData && title_id == 0) 130 if (type == SaveDataType::SaveData && title_id == 0) {
131 title_id = Core::CurrentProcess()->GetTitleID(); 131 title_id = Core::System::GetInstance().CurrentProcess()->GetTitleID();
132 }
132 133
133 std::string out = GetSaveDataSpaceIdPath(space); 134 std::string out = GetSaveDataSpaceIdPath(space);
134 135