From ffbdea6deb86c3f64d52420073f26810a7a115f2 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Wed, 23 Jun 2021 15:05:15 +0200 Subject: [PATCH] early-access version 1815 --- README.md | 2 +- src/core/file_sys/patch_manager.cpp | 18 ++---------------- src/core/file_sys/sdmc_factory.cpp | 8 -------- src/core/file_sys/sdmc_factory.h | 1 - src/core/hle/service/filesystem/filesystem.cpp | 10 ---------- src/core/hle/service/filesystem/filesystem.h | 1 - src/yuzu/game_list.cpp | 12 +++--------- src/yuzu/game_list.h | 7 +------ src/yuzu/main.cpp | 8 ++------ src/yuzu/main.h | 3 +-- 10 files changed, 10 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index a14b5de78..d2e5cca6b 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1814. +This is the source code for early-access 1815. ## Legal Notice diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp index 13d294ad8..53b8b7ca0 100755 --- a/src/core/file_sys/patch_manager.cpp +++ b/src/core/file_sys/patch_manager.cpp @@ -345,10 +345,8 @@ std::vector PatchManager::CreateCheatList( static void ApplyLayeredFS(VirtualFile& romfs, u64 title_id, ContentRecordType type, const Service::FileSystem::FileSystemController& fs_controller) { const auto load_dir = fs_controller.GetModificationLoadRoot(title_id); - const auto sdmc_load_dir = fs_controller.GetSDMCModificationLoadRoot(title_id); if ((type != ContentRecordType::Program && type != ContentRecordType::Data) || - ((load_dir == nullptr || load_dir->GetSize() <= 0) && - (sdmc_load_dir == nullptr || sdmc_load_dir->GetSize() <= 0))) { + load_dir == nullptr || load_dir->GetSize() <= 0) { return; } @@ -358,10 +356,7 @@ static void ApplyLayeredFS(VirtualFile& romfs, u64 title_id, ContentRecordType t } const auto& disabled = Settings::values.disabled_addons[title_id]; - std::vector patch_dirs = load_dir->GetSubdirectories(); - if (std::find(disabled.cbegin(), disabled.cend(), "SDMC") == disabled.cend()) { - patch_dirs.push_back(sdmc_load_dir); - } + auto patch_dirs = load_dir->GetSubdirectories(); std::sort(patch_dirs.begin(), patch_dirs.end(), [](const VirtualDir& l, const VirtualDir& r) { return l->GetName() < r->GetName(); }); @@ -529,15 +524,6 @@ PatchManager::PatchVersionNames PatchManager::GetPatchVersionNames(VirtualFile u } } - // SDMC mod directory (RomFS LayeredFS) - const auto sdmc_mod_dir = fs_controller.GetSDMCModificationLoadRoot(title_id); - if (sdmc_mod_dir != nullptr && sdmc_mod_dir->GetSize() > 0 && - IsDirValidAndNonEmpty(FindSubdirectoryCaseless(sdmc_mod_dir, "romfs"))) { - const auto mod_disabled = - std::find(disabled.begin(), disabled.end(), "SDMC") != disabled.end(); - out.insert_or_assign(mod_disabled ? "[D] SDMC" : "SDMC", "LayeredFS"); - } - // DLC const auto dlc_entries = content_provider.ListEntriesFilter(TitleType::AOC, ContentRecordType::Data); diff --git a/src/core/file_sys/sdmc_factory.cpp b/src/core/file_sys/sdmc_factory.cpp index 7e878123c..cb56d8f2d 100755 --- a/src/core/file_sys/sdmc_factory.cpp +++ b/src/core/file_sys/sdmc_factory.cpp @@ -27,14 +27,6 @@ ResultVal SDMCFactory::Open() const { return MakeResult(dir); } -VirtualDir SDMCFactory::GetSDMCModificationLoadRoot(u64 title_id) const { - // LayeredFS doesn't work on updates and title id-less homebrew - if (title_id == 0 || (title_id & 0xFFF) == 0x800) { - return nullptr; - } - return GetOrCreateDirectoryRelative(dir, fmt::format("/atmosphere/contents/{:016X}", title_id)); -} - VirtualDir SDMCFactory::GetSDMCContentDirectory() const { return GetOrCreateDirectoryRelative(dir, "/Nintendo/Contents"); } diff --git a/src/core/file_sys/sdmc_factory.h b/src/core/file_sys/sdmc_factory.h index c57514938..2bb92ba93 100755 --- a/src/core/file_sys/sdmc_factory.h +++ b/src/core/file_sys/sdmc_factory.h @@ -21,7 +21,6 @@ public: ResultVal Open() const; - VirtualDir GetSDMCModificationLoadRoot(u64 title_id) const; VirtualDir GetSDMCContentDirectory() const; RegisteredCache* GetSDMCContents() const; diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index d66e74d3a..3c16fe6c7 100755 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp @@ -703,16 +703,6 @@ FileSys::VirtualDir FileSystemController::GetModificationLoadRoot(u64 title_id) return bis_factory->GetModificationLoadRoot(title_id); } -FileSys::VirtualDir FileSystemController::GetSDMCModificationLoadRoot(u64 title_id) const { - LOG_TRACE(Service_FS, "Opening SDMC mod load root for tid={:016X}", title_id); - - if (sdmc_factory == nullptr) { - return nullptr; - } - - return sdmc_factory->GetSDMCModificationLoadRoot(title_id); -} - FileSys::VirtualDir FileSystemController::GetModificationDumpRoot(u64 title_id) const { LOG_TRACE(Service_FS, "Opening mod dump root for tid={:016X}", title_id); diff --git a/src/core/hle/service/filesystem/filesystem.h b/src/core/hle/service/filesystem/filesystem.h index d387af3cb..b6b1b9220 100755 --- a/src/core/hle/service/filesystem/filesystem.h +++ b/src/core/hle/service/filesystem/filesystem.h @@ -115,7 +115,6 @@ public: FileSys::VirtualDir GetContentDirectory(ContentStorageId id) const; FileSys::VirtualDir GetImageDirectory(ImageDirectoryId id) const; - FileSys::VirtualDir GetSDMCModificationLoadRoot(u64 title_id) const; FileSys::VirtualDir GetModificationLoadRoot(u64 title_id) const; FileSys::VirtualDir GetModificationDumpRoot(u64 title_id) const; diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index e44907be8..da956c99b 100755 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp @@ -521,9 +521,7 @@ void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, const std::stri QAction* remove_custom_config = remove_menu->addAction(tr("Remove Custom Configuration")); remove_menu->addSeparator(); QAction* remove_all_content = remove_menu->addAction(tr("Remove All Installed Contents")); - QMenu* dump_romfs_menu = context_menu.addMenu(tr("Dump RomFS")); - QAction* dump_romfs = dump_romfs_menu->addAction(tr("Dump RomFS")); - QAction* dump_romfs_sdmc = dump_romfs_menu->addAction(tr("Dump RomFS to SDMC")); + QAction* dump_romfs = context_menu.addAction(tr("Dump RomFS")); QAction* copy_tid = context_menu.addAction(tr("Copy Title ID to Clipboard")); QAction* navigate_to_gamedb_entry = context_menu.addAction(tr("Navigate to GameDB entry")); context_menu.addSeparator(); @@ -572,12 +570,8 @@ void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, const std::stri connect(remove_custom_config, &QAction::triggered, [this, program_id, path]() { emit RemoveFileRequested(program_id, GameListRemoveTarget::CustomConfiguration, path); }); - connect(dump_romfs, &QAction::triggered, [this, program_id, path]() { - emit DumpRomFSRequested(program_id, path, DumpRomFSTarget::Normal); - }); - connect(dump_romfs_sdmc, &QAction::triggered, [this, program_id, path]() { - emit DumpRomFSRequested(program_id, path, DumpRomFSTarget::SDMC); - }); + connect(dump_romfs, &QAction::triggered, + [this, program_id, path]() { emit DumpRomFSRequested(program_id, path); }); connect(copy_tid, &QAction::triggered, [this, program_id]() { emit CopyTIDRequested(program_id); }); connect(navigate_to_gamedb_entry, &QAction::triggered, [this, program_id]() { diff --git a/src/yuzu/game_list.h b/src/yuzu/game_list.h index 50402da51..b630e34ff 100755 --- a/src/yuzu/game_list.h +++ b/src/yuzu/game_list.h @@ -45,11 +45,6 @@ enum class GameListRemoveTarget { CustomConfiguration, }; -enum class DumpRomFSTarget { - Normal, - SDMC, -}; - enum class InstalledEntryType { Game, Update, @@ -97,7 +92,7 @@ signals: void RemoveInstalledEntryRequested(u64 program_id, InstalledEntryType type); void RemoveFileRequested(u64 program_id, GameListRemoveTarget target, const std::string& game_path); - void DumpRomFSRequested(u64 program_id, const std::string& game_path, DumpRomFSTarget target); + void DumpRomFSRequested(u64 program_id, const std::string& game_path); void CopyTIDRequested(u64 program_id); void NavigateToGamedbEntryRequested(u64 program_id, const CompatibilityList& compatibility_list); diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 46496c2de..85e1d0f29 100755 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1878,8 +1878,7 @@ void GMainWindow::RemoveCustomConfiguration(u64 program_id, const std::string& g } } -void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_path, - DumpRomFSTarget target) { +void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_path) { const auto failed = [this] { QMessageBox::warning(this, tr("RomFS Extraction Failed!"), tr("There was an error copying the RomFS files or the user " @@ -1907,10 +1906,7 @@ void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_pa return; } - 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 dump_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::DumpDir); const auto romfs_dir = fmt::format("{:016X}/romfs", *romfs_title_id); const auto path = Common::FS::PathToUTF8String(dump_dir / romfs_dir); diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 45c8310e1..5c199155a 100755 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -34,7 +34,6 @@ class QProgressDialog; class WaitTreeWidget; enum class GameListOpenTarget; enum class GameListRemoveTarget; -enum class DumpRomFSTarget; enum class InstalledEntryType; class GameListPlaceholder; @@ -245,7 +244,7 @@ private slots: void OnGameListRemoveInstalledEntry(u64 program_id, InstalledEntryType type); void OnGameListRemoveFile(u64 program_id, GameListRemoveTarget target, const std::string& game_path); - void OnGameListDumpRomFS(u64 program_id, const std::string& game_path, DumpRomFSTarget target); + void OnGameListDumpRomFS(u64 program_id, const std::string& game_path); void OnGameListCopyTID(u64 program_id); void OnGameListNavigateToGamedbEntry(u64 program_id, const CompatibilityList& compatibility_list);