mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 16:37:57 -05:00
Merge pull request #6471 from lat9nq/dump-as-mod
yuzu qt, core: Support LayeredFS mods from SDMC directory
This commit is contained in:
@ -1882,7 +1882,8 @@ void GMainWindow::RemoveCustomConfiguration(u64 program_id, const std::string& g
|
||||
}
|
||||
}
|
||||
|
||||
void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_path) {
|
||||
void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_path,
|
||||
DumpRomFSTarget target) {
|
||||
const auto failed = [this] {
|
||||
QMessageBox::warning(this, tr("RomFS Extraction Failed!"),
|
||||
tr("There was an error copying the RomFS files or the user "
|
||||
@ -1910,7 +1911,10 @@ void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_pa
|
||||
return;
|
||||
}
|
||||
|
||||
const auto dump_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::DumpDir);
|
||||
const auto dump_dir =
|
||||
target == DumpRomFSTarget::Normal
|
||||
? Common::FS::GetYuzuPath(Common::FS::YuzuPath::DumpDir)
|
||||
: Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir) / "atmosphere" / "contents";
|
||||
const auto romfs_dir = fmt::format("{:016X}/romfs", *romfs_title_id);
|
||||
|
||||
const auto path = Common::FS::PathToUTF8String(dump_dir / romfs_dir);
|
||||
@ -1920,7 +1924,8 @@ void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_pa
|
||||
if (*romfs_title_id == program_id) {
|
||||
const u64 ivfc_offset = loader->ReadRomFSIVFCOffset();
|
||||
const FileSys::PatchManager pm{program_id, system.GetFileSystemController(), installed};
|
||||
romfs = pm.PatchRomFS(file, ivfc_offset, FileSys::ContentRecordType::Program);
|
||||
romfs =
|
||||
pm.PatchRomFS(file, ivfc_offset, FileSys::ContentRecordType::Program, nullptr, false);
|
||||
} else {
|
||||
romfs = installed.GetEntry(*romfs_title_id, FileSys::ContentRecordType::Data)->GetRomFS();
|
||||
}
|
||||
|
Reference in New Issue
Block a user