summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Zach Hilman2018-11-20 17:49:09 -0500
committerGravatar Zach Hilman2018-11-20 17:49:09 -0500
commit17d8e25cbfd0c8937c8791bc1941af85f9541666 (patch)
tree334d1ccaa0fdba0cd02cf4b721de2b0408ca62c6 /src/core
parentMerge pull request #1722 from MysticExile/enable-applictation-crash-report (diff)
downloadyuzu-17d8e25cbfd0c8937c8791bc1941af85f9541666.tar.gz
yuzu-17d8e25cbfd0c8937c8791bc1941af85f9541666.tar.xz
yuzu-17d8e25cbfd0c8937c8791bc1941af85f9541666.zip
settings: Add option to dump ExeFS of games upon launch
When enabled, all exefs(es) will be copied to yuzu/dump/<title_id>/exefs.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/file_sys/patch_manager.cpp9
-rw-r--r--src/core/settings.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp
index 8d062eb3e..f56b1c773 100644
--- a/src/core/file_sys/patch_manager.cpp
+++ b/src/core/file_sys/patch_manager.cpp
@@ -57,6 +57,15 @@ VirtualDir PatchManager::PatchExeFS(VirtualDir exefs) const {
57 if (exefs == nullptr) 57 if (exefs == nullptr)
58 return exefs; 58 return exefs;
59 59
60 if (Settings::values.dump_exefs) {
61 LOG_INFO(Loader, "Dumping ExeFS for title_id={:016X}", title_id);
62 const auto dump_dir = Service::FileSystem::GetModificationDumpRoot(title_id);
63 if (dump_dir != nullptr) {
64 const auto exefs_dir = GetOrCreateDirectoryRelative(dump_dir, "/exefs");
65 VfsRawCopyD(exefs, exefs_dir);
66 }
67 }
68
60 const auto installed = Service::FileSystem::GetUnionContents(); 69 const auto installed = Service::FileSystem::GetUnionContents();
61 70
62 // Game Updates 71 // Game Updates
diff --git a/src/core/settings.h b/src/core/settings.h
index e424479f2..9767bc162 100644
--- a/src/core/settings.h
+++ b/src/core/settings.h
@@ -159,6 +159,7 @@ struct Values {
159 bool use_gdbstub; 159 bool use_gdbstub;
160 u16 gdbstub_port; 160 u16 gdbstub_port;
161 std::string program_args; 161 std::string program_args;
162 bool dump_exefs;
162 bool dump_nso; 163 bool dump_nso;
163 164
164 // WebService 165 // WebService