diff options
author | t895 <clombardo169@gmail.com> | 2024-01-19 22:37:34 +0100 |
---|---|---|
committer | t895 <clombardo169@gmail.com> | 2024-01-20 02:54:50 +0100 |
commit | 03fa91ba3c52c0371f0d57ea8a5618feaf3012e7 (patch) | |
tree | 740a2a94eff69f5d20b1e7424f8665acbd950939 /src/frontend_common/content_manager.h | |
parent | android: Use callback to update progress bar dialogs (diff) | |
download | yuzu-03fa91ba3c52c0371f0d57ea8a5618feaf3012e7.tar yuzu-03fa91ba3c52c0371f0d57ea8a5618feaf3012e7.tar.gz yuzu-03fa91ba3c52c0371f0d57ea8a5618feaf3012e7.tar.bz2 yuzu-03fa91ba3c52c0371f0d57ea8a5618feaf3012e7.tar.lz yuzu-03fa91ba3c52c0371f0d57ea8a5618feaf3012e7.tar.xz yuzu-03fa91ba3c52c0371f0d57ea8a5618feaf3012e7.tar.zst yuzu-03fa91ba3c52c0371f0d57ea8a5618feaf3012e7.zip |
Diffstat (limited to '')
-rw-r--r-- | src/frontend_common/content_manager.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/frontend_common/content_manager.h b/src/frontend_common/content_manager.h index 8e55f4ca0..248ce573e 100644 --- a/src/frontend_common/content_manager.h +++ b/src/frontend_common/content_manager.h @@ -65,6 +65,23 @@ inline bool RemoveBaseContent(const Service::FileSystem::FileSystemController& f fs_controller.GetSDMCContents()->RemoveExistingEntry(program_id); } +inline bool RemoveMod(const Service::FileSystem::FileSystemController& fs_controller, + const u64 program_id, const std::string& mod_name) { + // Check general Mods (LayeredFS and IPS) + const auto mod_dir = fs_controller.GetModificationLoadRoot(program_id); + if (mod_dir != nullptr) { + return mod_dir->DeleteSubdirectoryRecursive(mod_name); + } + + // Check SDMC mod directory (RomFS LayeredFS) + const auto sdmc_mod_dir = fs_controller.GetSDMCModificationLoadRoot(program_id); + if (sdmc_mod_dir != nullptr) { + return sdmc_mod_dir->DeleteSubdirectoryRecursive(mod_name); + } + + return false; +} + inline InstallResult InstallNSP( Core::System* system, FileSys::VfsFilesystem* vfs, const std::string& filename, const std::function<bool(size_t, size_t)>& callback = std::function<bool(size_t, size_t)>()) { |