diff options
| author | 2018-11-20 19:22:26 -0500 | |
|---|---|---|
| committer | 2018-11-20 19:22:34 -0500 | |
| commit | 54e74b3572d3f61fdbaf4f2ddb8b54e2c06a5ab8 (patch) | |
| tree | 6aadc4e9470d09dd6279af51cfb681783668ba67 | |
| parent | patch_manager: Apply LayeredExeFS patches (diff) | |
| download | yuzu-54e74b3572d3f61fdbaf4f2ddb8b54e2c06a5ab8.tar.gz yuzu-54e74b3572d3f61fdbaf4f2ddb8b54e2c06a5ab8.tar.xz yuzu-54e74b3572d3f61fdbaf4f2ddb8b54e2c06a5ab8.zip | |
patch_manager: Show LayeredExeFS patch in add-ons column
The decision was made to name them LayeredExeFS instead of just LayeredFS to differentiate from normal RomFS-based mods. The name may be long/unweildy, but conveys the meaning well.
| -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 { | |||
| 26 | constexpr u64 SINGLE_BYTE_MODULUS = 0x100; | 26 | constexpr u64 SINGLE_BYTE_MODULUS = 0x100; |
| 27 | constexpr u64 DLC_BASE_TITLE_ID_MASK = 0xFFFFFFFFFFFFE000; | 27 | constexpr u64 DLC_BASE_TITLE_ID_MASK = 0xFFFFFFFFFFFFE000; |
| 28 | 28 | ||
| 29 | constexpr std::array<const char*, 14> EXEFS_FILE_NAMES{ | ||
| 30 | "main", "main.npdm", "rtld", "sdk", "subsdk0", "subsdk1", "subsdk2", | ||
| 31 | "subsdk3", "subsdk4", "subsdk5", "subsdk6", "subsdk7", "subsdk8", "subsdk9", | ||
| 32 | }; | ||
| 33 | |||
| 29 | struct NSOBuildHeader { | 34 | struct NSOBuildHeader { |
| 30 | u32_le magic; | 35 | u32_le magic; |
| 31 | INSERT_PADDING_BYTES(0x3C); | 36 | INSERT_PADDING_BYTES(0x3C); |
| @@ -82,7 +87,6 @@ VirtualDir PatchManager::PatchExeFS(VirtualDir exefs) const { | |||
| 82 | // LayeredExeFS | 87 | // LayeredExeFS |
| 83 | const auto load_dir = Service::FileSystem::GetModificationLoadRoot(title_id); | 88 | const auto load_dir = Service::FileSystem::GetModificationLoadRoot(title_id); |
| 84 | if (load_dir != nullptr && load_dir->GetSize() > 0) { | 89 | if (load_dir != nullptr && load_dir->GetSize() > 0) { |
| 85 | |||
| 86 | auto patch_dirs = load_dir->GetSubdirectories(); | 90 | auto patch_dirs = load_dir->GetSubdirectories(); |
| 87 | std::sort( | 91 | std::sort( |
| 88 | patch_dirs.begin(), patch_dirs.end(), | 92 | patch_dirs.begin(), patch_dirs.end(), |
| @@ -348,18 +352,25 @@ std::map<std::string, std::string, std::less<>> PatchManager::GetPatchVersionNam | |||
| 348 | if (IsDirValidAndNonEmpty(exefs_dir)) { | 352 | if (IsDirValidAndNonEmpty(exefs_dir)) { |
| 349 | bool ips = false; | 353 | bool ips = false; |
| 350 | bool ipswitch = false; | 354 | bool ipswitch = false; |
| 355 | bool layeredfs = false; | ||
| 351 | 356 | ||
| 352 | for (const auto& file : exefs_dir->GetFiles()) { | 357 | for (const auto& file : exefs_dir->GetFiles()) { |
| 353 | if (file->GetExtension() == "ips") | 358 | if (file->GetExtension() == "ips") { |
| 354 | ips = true; | 359 | ips = true; |
| 355 | else if (file->GetExtension() == "pchtxt") | 360 | } else if (file->GetExtension() == "pchtxt") { |
| 356 | ipswitch = true; | 361 | ipswitch = true; |
| 362 | } else if (std::find(EXEFS_FILE_NAMES.begin(), EXEFS_FILE_NAMES.end(), | ||
| 363 | file->GetName()) != EXEFS_FILE_NAMES.end()) { | ||
| 364 | layeredfs = true; | ||
| 365 | } | ||
| 357 | } | 366 | } |
| 358 | 367 | ||
| 359 | if (ips) | 368 | if (ips) |
| 360 | AppendCommaIfNotEmpty(types, "IPS"); | 369 | AppendCommaIfNotEmpty(types, "IPS"); |
| 361 | if (ipswitch) | 370 | if (ipswitch) |
| 362 | AppendCommaIfNotEmpty(types, "IPSwitch"); | 371 | AppendCommaIfNotEmpty(types, "IPSwitch"); |
| 372 | if (layeredfs) | ||
| 373 | AppendCommaIfNotEmpty(types, "LayeredExeFS"); | ||
| 363 | } | 374 | } |
| 364 | if (IsDirValidAndNonEmpty(mod->GetSubdirectory("romfs"))) | 375 | if (IsDirValidAndNonEmpty(mod->GetSubdirectory("romfs"))) |
| 365 | AppendCommaIfNotEmpty(types, "LayeredFS"); | 376 | 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 @@ | |||
| 148 | <item> | 148 | <item> |
| 149 | <widget class="QCheckBox" name="dump_exefs"> | 149 | <widget class="QCheckBox" name="dump_exefs"> |
| 150 | <property name="whatsThis"> | 150 | <property name="whatsThis"> |
| 151 | <string>When checked, any game that yuzu loads will have its ExeFS dumped</string> | 151 | <string>When checked, any game that yuzu loads will have its ExeFS dumped to the yuzu/dump directory.</string> |
| 152 | </property> | 152 | </property> |
| 153 | <property name="text"> | 153 | <property name="text"> |
| 154 | <string>Dump ExeFS</string> | 154 | <string>Dump ExeFS</string> |