diff --git a/src/core/file_format/pkg.cpp b/src/core/file_format/pkg.cpp index a6b5eb9a8..ecc5f10a4 100644 --- a/src/core/file_format/pkg.cpp +++ b/src/core/file_format/pkg.cpp @@ -350,7 +350,7 @@ bool PKG::Extract(const std::filesystem::path& filepath, const std::filesystem:: auto title_id = GetTitleID(); if (parent_path.filename() != title_id && - !fmt::UTF(extract_path.u8string()).data.ends_with("-UPDATE")) { + !fmt::UTF(extract_path.u8string()).data.ends_with("-patch")) { extractPaths[ndinode_counter] = parent_path / title_id; } else { // DLCs path has different structure diff --git a/src/core/file_sys/fs.cpp b/src/core/file_sys/fs.cpp index ec940503f..4dad44874 100644 --- a/src/core/file_sys/fs.cpp +++ b/src/core/file_sys/fs.cpp @@ -70,6 +70,10 @@ std::filesystem::path MntPoints::GetHostPath(std::string_view path, bool* is_rea std::filesystem::path host_path = mount->host_path / rel_path; std::filesystem::path patch_path = mount->host_path; patch_path += "-UPDATE"; + if (!std::filesystem::exists(patch_path)) { + patch_path = mount->host_path; + patch_path += "-patch"; + } patch_path /= rel_path; if ((corrected_path.starts_with("/app0") || corrected_path.starts_with("/hostapp")) && diff --git a/src/emulator.cpp b/src/emulator.cpp index b6586ecfd..4ec62995b 100644 --- a/src/emulator.cpp +++ b/src/emulator.cpp @@ -80,7 +80,7 @@ void Emulator::Run(const std::filesystem::path& file, const std::vectorshow(); @@ -434,6 +450,9 @@ public: QString folder_path, game_update_path, dlc_path, save_data_path, trophy_data_path; Common::FS::PathToQString(folder_path, m_games[itemID].path); game_update_path = folder_path + "-UPDATE"; + if (!std::filesystem::exists(Common::FS::PathFromQString(game_update_path))) { + game_update_path = folder_path + "-patch"; + } Common::FS::PathToQString( dlc_path, Config::getAddonInstallDir() / Common::FS::PathFromQString(folder_path).parent_path().filename()); diff --git a/src/qt_gui/kbm_config_dialog.cpp b/src/qt_gui/kbm_config_dialog.cpp index 49a6bcd89..1851c591d 100644 --- a/src/qt_gui/kbm_config_dialog.cpp +++ b/src/qt_gui/kbm_config_dialog.cpp @@ -225,7 +225,8 @@ void EditorDialog::loadInstalledGames() { QDir parentFolder(installDir); QFileInfoList fileList = parentFolder.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot); for (const auto& fileInfo : fileList) { - if (fileInfo.isDir() && !fileInfo.filePath().endsWith("-UPDATE")) { + if (fileInfo.isDir() && (!fileInfo.filePath().endsWith("-UPDATE") || + !fileInfo.filePath().endsWith("-patch"))) { gameComboBox->addItem(fileInfo.fileName()); // Add game name to combo box } } diff --git a/src/qt_gui/main_window.cpp b/src/qt_gui/main_window.cpp index bde32a52d..68135048e 100644 --- a/src/qt_gui/main_window.cpp +++ b/src/qt_gui/main_window.cpp @@ -840,7 +840,7 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int // Default paths auto game_folder_path = game_install_dir / pkg.GetTitleID(); auto game_update_path = use_game_update ? game_folder_path.parent_path() / - (std::string{pkg.GetTitleID()} + "-UPDATE") + (std::string{pkg.GetTitleID()} + "-patch") : game_folder_path; const int max_depth = 5; @@ -851,7 +851,7 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int if (found_game.has_value()) { game_folder_path = found_game.value().parent_path(); game_update_path = use_game_update ? game_folder_path.parent_path() / - (std::string{pkg.GetTitleID()} + "-UPDATE") + (std::string{pkg.GetTitleID()} + "-patch") : game_folder_path; } } else { @@ -866,7 +866,7 @@ void MainWindow::InstallDragDropPkg(std::filesystem::path file, int pkgNum, int game_folder_path = game_install_dir / pkg.GetTitleID(); } game_update_path = use_game_update ? game_folder_path.parent_path() / - (std::string{pkg.GetTitleID()} + "-UPDATE") + (std::string{pkg.GetTitleID()} + "-patch") : game_folder_path; }