diff options
author | t895 <[email protected]> | 2024-01-19 16:37:34 -0500 |
---|---|---|
committer | t895 <[email protected]> | 2024-01-19 20:54:50 -0500 |
commit | 03fa91ba3c52c0371f0d57ea8a5618feaf3012e7 (patch) | |
tree | 740a2a94eff69f5d20b1e7424f8665acbd950939 /src/yuzu | |
parent | d79d4d5986e952000624edb244839fd1996be4ae (diff) | |
download | yuzu-android-03fa91ba3c52c0371f0d57ea8a5618feaf3012e7.tar.gz yuzu-android-03fa91ba3c52c0371f0d57ea8a5618feaf3012e7.zip |
android: Add addon delete button
Required some refactoring of retrieving patches in order for the frontend to pass the right information to ContentManager for deletion.
Diffstat (limited to 'src/yuzu')
-rw-r--r-- | src/yuzu/configuration/configure_per_game_addons.cpp | 7 | ||||
-rw-r--r-- | src/yuzu/game_list_worker.cpp | 11 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/yuzu/configuration/configure_per_game_addons.cpp b/src/yuzu/configuration/configure_per_game_addons.cpp index 140a7fe5d..568775027 100644 --- a/src/yuzu/configuration/configure_per_game_addons.cpp +++ b/src/yuzu/configuration/configure_per_game_addons.cpp @@ -122,9 +122,8 @@ void ConfigurePerGameAddons::LoadConfiguration() { const auto& disabled = Settings::values.disabled_addons[title_id]; - for (const auto& patch : pm.GetPatchVersionNames(update_raw)) { - const auto name = - QString::fromStdString(patch.first).replace(QStringLiteral("[D] "), QString{}); + for (const auto& patch : pm.GetPatches(update_raw)) { + const auto name = QString::fromStdString(patch.name); auto* const first_item = new QStandardItem; first_item->setText(name); @@ -136,7 +135,7 @@ void ConfigurePerGameAddons::LoadConfiguration() { first_item->setCheckState(patch_disabled ? Qt::Unchecked : Qt::Checked); list_items.push_back(QList<QStandardItem*>{ - first_item, new QStandardItem{QString::fromStdString(patch.second)}}); + first_item, new QStandardItem{QString::fromStdString(patch.version)}}); item_model->appendRow(list_items.back()); } diff --git a/src/yuzu/game_list_worker.cpp b/src/yuzu/game_list_worker.cpp index dc006832e..9747e3fb3 100644 --- a/src/yuzu/game_list_worker.cpp +++ b/src/yuzu/game_list_worker.cpp @@ -164,18 +164,19 @@ QString FormatPatchNameVersions(const FileSys::PatchManager& patch_manager, QString out; FileSys::VirtualFile update_raw; loader.ReadUpdateRaw(update_raw); - for (const auto& kv : patch_manager.GetPatchVersionNames(update_raw)) { - const bool is_update = kv.first == "Update" || kv.first == "[D] Update"; + for (const auto& patch : patch_manager.GetPatches(update_raw)) { + const bool is_update = patch.name == "Update"; if (!updatable && is_update) { continue; } - const QString type = QString::fromStdString(kv.first); + const QString type = + QString::fromStdString(patch.enabled ? patch.name : "[D] " + patch.name); - if (kv.second.empty()) { + if (patch.version.empty()) { out.append(QStringLiteral("%1\n").arg(type)); } else { - auto ver = kv.second; + auto ver = patch.version; // Display container name for packed updates if (is_update && ver == "PACKED") { |