summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-10-01 15:12:14 +0200
committerZach Hilman <zachhilman@gmail.com>2018-10-04 18:29:14 +0200
commitbc4bec8a60720b1f911fa960ab633eec4afc975e (patch)
treeaa7fe54a0322c12fa18205b4c5fdac062a9077c0 /src/core/file_sys
parentMerge pull request #1415 from DarkLordZach/ips (diff)
downloadyuzu-bc4bec8a60720b1f911fa960ab633eec4afc975e.tar
yuzu-bc4bec8a60720b1f911fa960ab633eec4afc975e.tar.gz
yuzu-bc4bec8a60720b1f911fa960ab633eec4afc975e.tar.bz2
yuzu-bc4bec8a60720b1f911fa960ab633eec4afc975e.tar.lz
yuzu-bc4bec8a60720b1f911fa960ab633eec4afc975e.tar.xz
yuzu-bc4bec8a60720b1f911fa960ab633eec4afc975e.tar.zst
yuzu-bc4bec8a60720b1f911fa960ab633eec4afc975e.zip
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/fsmitm_romfsbuild.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/file_sys/fsmitm_romfsbuild.cpp b/src/core/file_sys/fsmitm_romfsbuild.cpp
index 2a913ce82..4aa8ae369 100644
--- a/src/core/file_sys/fsmitm_romfsbuild.cpp
+++ b/src/core/file_sys/fsmitm_romfsbuild.cpp
@@ -26,6 +26,7 @@
#include "common/alignment.h"
#include "common/assert.h"
#include "core/file_sys/fsmitm_romfsbuild.h"
+#include "core/file_sys/ips_layer.h"
#include "core/file_sys/vfs.h"
#include "core/file_sys/vfs_vector.h"
@@ -138,6 +139,9 @@ void RomFSBuildContext::VisitDirectory(VirtualDir root_romfs,
for (const auto& kv : entries) {
if (kv.second == VfsEntryType::Directory) {
+ if (dir->GetSubdirectory(kv.first + ".stub") != nullptr)
+ continue;
+
const auto child = std::make_shared<RomFSBuildDirectoryContext>();
// Set child's path.
child->cur_path_ofs = parent->path_len + 1;
@@ -151,6 +155,9 @@ void RomFSBuildContext::VisitDirectory(VirtualDir root_romfs,
child_dirs.push_back(child);
}
} else {
+ if (dir->GetFile(kv.first + ".stub") != nullptr)
+ continue;
+
const auto child = std::make_shared<RomFSBuildFileContext>();
// Set child's path.
child->cur_path_ofs = parent->path_len + 1;
@@ -162,6 +169,13 @@ void RomFSBuildContext::VisitDirectory(VirtualDir root_romfs,
child->source = root_romfs->GetFileRelative(child->path);
+ if (dir->GetFile(kv.first + ".ips") != nullptr) {
+ const auto ips = dir->GetFile(kv.first + ".ips");
+ auto patched = PatchIPS(child->source, ips);
+ if (patched != nullptr)
+ child->source = std::move(patched);
+ }
+
child->size = child->source->GetSize();
AddFile(parent, child);