diff options
| author | JPikachu <jpikachu@eden-emu.dev> | 2025-10-14 00:12:12 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2025-10-14 00:12:12 +0200 |
| commit | 8ae7cfe96aec47bb0812f6f64701b69b2debe9c9 (patch) | |
| tree | ea0ea7574a970e3818032dcede33c807cc2dda81 /src/core/file_sys/patch_manager.cpp | |
| parent | e157b3fa96ab3d5078e54db76aa5d9f78c233e1c (diff) | |
[romfs] Add romfslite mod folder support (Totk Ultracam) (#2730)
Support the romfslite folder type introduced in Atmosphere 1.9.5 for
memory-optimized mod loading. The emulator now detects and loads
romfslite folders the same way as romfs folders.
Utilised by Ultracam 3.0. Credit to Zephyron (Citron)
Co-authored-by: Zephyron <zephyron@citron-emu.org>
Co-authored-by: Zephyron <zephyron@citron-emu.org>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2730
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Co-authored-by: JPikachu <jpikachu@eden-emu.dev>
Co-committed-by: JPikachu <jpikachu@eden-emu.dev>
Diffstat (limited to 'src/core/file_sys/patch_manager.cpp')
| -rw-r--r-- | src/core/file_sys/patch_manager.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp index 21d45235e4..11984ca7ca 100644 --- a/src/core/file_sys/patch_manager.cpp +++ b/src/core/file_sys/patch_manager.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later @@ -379,6 +382,11 @@ static void ApplyLayeredFS(VirtualFile& romfs, u64 title_id, ContentRecordType t if (romfs_dir != nullptr) layers.emplace_back(std::make_shared<CachedVfsDirectory>(std::move(romfs_dir))); + // Support for romfslite introduced in Atmosphere 1.9.5 + auto romfslite_dir = FindSubdirectoryCaseless(subdir, "romfslite"); + if (romfslite_dir != nullptr) + layers.emplace_back(std::make_shared<CachedVfsDirectory>(std::move(romfslite_dir))); + auto ext_dir = FindSubdirectoryCaseless(subdir, "romfs_ext"); if (ext_dir != nullptr) layers_ext.emplace_back(std::make_shared<CachedVfsDirectory>(std::move(ext_dir))); @@ -537,7 +545,8 @@ std::vector<Patch> PatchManager::GetPatches(VirtualFile update_raw) const { if (layeredfs) AppendCommaIfNotEmpty(types, "LayeredExeFS"); } - if (IsDirValidAndNonEmpty(FindSubdirectoryCaseless(mod, "romfs"))) + if (IsDirValidAndNonEmpty(FindSubdirectoryCaseless(mod, "romfs")) || + IsDirValidAndNonEmpty(FindSubdirectoryCaseless(mod, "romfslite"))) AppendCommaIfNotEmpty(types, "LayeredFS"); if (IsDirValidAndNonEmpty(FindSubdirectoryCaseless(mod, "cheats"))) AppendCommaIfNotEmpty(types, "Cheats"); @@ -563,7 +572,8 @@ std::vector<Patch> PatchManager::GetPatches(VirtualFile update_raw) const { if (IsDirValidAndNonEmpty(FindSubdirectoryCaseless(sdmc_mod_dir, "exefs"))) { AppendCommaIfNotEmpty(types, "LayeredExeFS"); } - if (IsDirValidAndNonEmpty(FindSubdirectoryCaseless(sdmc_mod_dir, "romfs"))) { + if (IsDirValidAndNonEmpty(FindSubdirectoryCaseless(sdmc_mod_dir, "romfs")) || + IsDirValidAndNonEmpty(FindSubdirectoryCaseless(sdmc_mod_dir, "romfslite"))) { AppendCommaIfNotEmpty(types, "LayeredFS"); } |
