VERY experimental Nintendo Switch 2 emulator
C++
patch_manager: Add support for using LayeredFS with Data
Zach Hilmanee70cf8a1a2f
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cppindex 0117cb0bf7..1f49285620 100644--- a/src/core/file_sys/patch_manager.cpp+++ b/src/core/file_sys/patch_manager.cpp@@ -168,7 +168,8 @@ bool PatchManager::HasNSOPatch(const std::array<u8, 32>& build_id_) const {static void ApplyLayeredFS(VirtualFile& romfs, u64 title_id, ContentRecordType type) {const auto load_dir = Service::FileSystem::GetModificationLoadRoot(title_id);- if (type != ContentRecordType::Program || load_dir == nullptr || load_dir->GetSize() <= 0) {+ if ((type != ContentRecordType::Program && type != ContentRecordType::Data) ||+ load_dir == nullptr || load_dir->GetSize() <= 0) {return;}@@ -218,7 +219,7 @@ VirtualFile PatchManager::PatchRomFS(VirtualFile romfs, u64 ivfc_offset, Contenttitle_id, static_cast<u8>(type)).c_str();- if (type == ContentRecordType::Program)+ if (type == ContentRecordType::Program || type == ContentRecordType::Data)LOG_INFO(Loader, log_string);elseLOG_DEBUG(Loader, log_string);