From 1974911a71e156348aa01c7862df4edfc427c48c Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sat, 20 Jun 2020 13:44:56 +0200 Subject: [PATCH] patch manager: Skip legacy patch.yml in the GUI The legacy patches aren't supposed to be shown in the GUI anyway. --- rpcs3/rpcs3qt/patch_manager_dialog.cpp | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/rpcs3/rpcs3qt/patch_manager_dialog.cpp b/rpcs3/rpcs3qt/patch_manager_dialog.cpp index da271ef485..3f0d38f05d 100644 --- a/rpcs3/rpcs3qt/patch_manager_dialog.cpp +++ b/rpcs3/rpcs3qt/patch_manager_dialog.cpp @@ -87,28 +87,20 @@ void patch_manager_dialog::load_patches() { m_map.clear(); - // NOTE: Make sure to load these in the same order as they are applied on boot + // NOTE: Make sure these paths are loaded in the same order as they are applied on boot - // Legacy path (in case someone puts it there) - patch_engine::load(m_map, fs::get_config_dir() + "patch.yml"); - - // New paths - const std::string imports_path = patch_engine::get_imported_patch_path(); const std::string patches_path = fs::get_config_dir() + "patches/"; const QStringList filters = QStringList() << "*_patch.yml"; - const QStringList path_list = QDir(QString::fromStdString(patches_path)).entryList(filters); - patch_engine::load(m_map, patches_path + "patch.yml"); - patch_engine::load(m_map, imports_path); + QStringList path_list; + path_list << "patch.yml"; + path_list << "imported_patch.yml"; + path_list << QDir(QString::fromStdString(patches_path)).entryList(filters); + path_list.removeDuplicates(); // make sure to load patch.yml and imported_patch.yml only once for (const auto& path : path_list) { - const std::string patch_path = patches_path + path.toStdString(); - - if (patch_path != imports_path) - { - patch_engine::load(m_map, patch_path); - } + patch_engine::load(m_map, patches_path + path.toStdString()); } }