diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-11-21 01:22:26 +0100 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-11-21 01:22:34 +0100 |
commit | 54e74b3572d3f61fdbaf4f2ddb8b54e2c06a5ab8 (patch) | |
tree | 6aadc4e9470d09dd6279af51cfb681783668ba67 | |
parent | patch_manager: Apply LayeredExeFS patches (diff) | |
download | yuzu-54e74b3572d3f61fdbaf4f2ddb8b54e2c06a5ab8.tar yuzu-54e74b3572d3f61fdbaf4f2ddb8b54e2c06a5ab8.tar.gz yuzu-54e74b3572d3f61fdbaf4f2ddb8b54e2c06a5ab8.tar.bz2 yuzu-54e74b3572d3f61fdbaf4f2ddb8b54e2c06a5ab8.tar.lz yuzu-54e74b3572d3f61fdbaf4f2ddb8b54e2c06a5ab8.tar.xz yuzu-54e74b3572d3f61fdbaf4f2ddb8b54e2c06a5ab8.tar.zst yuzu-54e74b3572d3f61fdbaf4f2ddb8b54e2c06a5ab8.zip |
-rw-r--r-- | src/core/file_sys/patch_manager.cpp | 17 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_debug.ui | 2 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp index ccc4f3061..e8df08724 100644 --- a/src/core/file_sys/patch_manager.cpp +++ b/src/core/file_sys/patch_manager.cpp @@ -26,6 +26,11 @@ namespace FileSys { constexpr u64 SINGLE_BYTE_MODULUS = 0x100; constexpr u64 DLC_BASE_TITLE_ID_MASK = 0xFFFFFFFFFFFFE000; +constexpr std::array<const char*, 14> EXEFS_FILE_NAMES{ + "main", "main.npdm", "rtld", "sdk", "subsdk0", "subsdk1", "subsdk2", + "subsdk3", "subsdk4", "subsdk5", "subsdk6", "subsdk7", "subsdk8", "subsdk9", +}; + struct NSOBuildHeader { u32_le magic; INSERT_PADDING_BYTES(0x3C); @@ -82,7 +87,6 @@ VirtualDir PatchManager::PatchExeFS(VirtualDir exefs) const { // LayeredExeFS const auto load_dir = Service::FileSystem::GetModificationLoadRoot(title_id); if (load_dir != nullptr && load_dir->GetSize() > 0) { - auto patch_dirs = load_dir->GetSubdirectories(); std::sort( patch_dirs.begin(), patch_dirs.end(), @@ -348,18 +352,25 @@ std::map<std::string, std::string, std::less<>> PatchManager::GetPatchVersionNam if (IsDirValidAndNonEmpty(exefs_dir)) { bool ips = false; bool ipswitch = false; + bool layeredfs = false; for (const auto& file : exefs_dir->GetFiles()) { - if (file->GetExtension() == "ips") + if (file->GetExtension() == "ips") { ips = true; - else if (file->GetExtension() == "pchtxt") + } else if (file->GetExtension() == "pchtxt") { ipswitch = true; + } else if (std::find(EXEFS_FILE_NAMES.begin(), EXEFS_FILE_NAMES.end(), + file->GetName()) != EXEFS_FILE_NAMES.end()) { + layeredfs = true; + } } if (ips) AppendCommaIfNotEmpty(types, "IPS"); if (ipswitch) AppendCommaIfNotEmpty(types, "IPSwitch"); + if (layeredfs) + AppendCommaIfNotEmpty(types, "LayeredExeFS"); } if (IsDirValidAndNonEmpty(mod->GetSubdirectory("romfs"))) AppendCommaIfNotEmpty(types, "LayeredFS"); diff --git a/src/yuzu/configuration/configure_debug.ui b/src/yuzu/configuration/configure_debug.ui index f51f8702b..758a92335 100644 --- a/src/yuzu/configuration/configure_debug.ui +++ b/src/yuzu/configuration/configure_debug.ui @@ -148,7 +148,7 @@ <item> <widget class="QCheckBox" name="dump_exefs"> <property name="whatsThis"> - <string>When checked, any game that yuzu loads will have its ExeFS dumped</string> + <string>When checked, any game that yuzu loads will have its ExeFS dumped to the yuzu/dump directory.</string> </property> <property name="text"> <string>Dump ExeFS</string> |