diff options
| author | JosJuice <josjuice@gmail.com> | 2020-06-16 11:21:44 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2020-06-16 11:21:44 +0200 |
| commit | c236d89f640e05eb38e8bb200d046a22c0b2b202 (patch) | |
| tree | 638ad8c89e7c418e259089b3551612e7b246e079 /Source/Core | |
| parent | 26789163e2aafcabdabc70aad76a76ff499603d4 (diff) | |
DolphinQt: Actually disable converting from TGC
When I made PR 8773, I only covered the case where multiple files
are selected, not the more common case where one file is selected.
Oops
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinQt/GameList/GameList.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/Core/DolphinQt/GameList/GameList.cpp b/Source/Core/DolphinQt/GameList/GameList.cpp index d3f72e14f2..5efb5bf576 100644 --- a/Source/Core/DolphinQt/GameList/GameList.cpp +++ b/Source/Core/DolphinQt/GameList/GameList.cpp @@ -254,16 +254,18 @@ void GameList::ShowContextMenu(const QPoint&) QMenu* menu = new QMenu(this); + const auto can_convert = [](const std::shared_ptr<const UICommon::GameFile>& game) { + // Converting from TGC is temporarily disabled because PR #8738 was merged prematurely. + // The TGC check will be removed by PR #8644. + return DiscIO::IsDisc(game->GetPlatform()) && game->IsVolumeSizeAccurate() && + game->GetBlobType() != DiscIO::BlobType::TGC; + }; + if (HasMultipleSelected()) { const auto selected_games = GetSelectedGames(); - if (std::all_of(selected_games.begin(), selected_games.end(), [](const auto& game) { - // Converting from TGC is temporarily disabled because PR #8738 was merged prematurely. - // The TGC check will be removed by PR #8644. - return DiscIO::IsDisc(game->GetPlatform()) && game->IsVolumeSizeAccurate() && - game->GetBlobType() != DiscIO::BlobType::TGC; - })) + if (std::all_of(selected_games.begin(), selected_games.end(), can_convert)) { menu->addAction(tr("Convert Selected Files..."), this, &GameList::ConvertFile); menu->addSeparator(); @@ -296,7 +298,7 @@ void GameList::ShowContextMenu(const QPoint&) menu->addAction(tr("Set as &Default ISO"), this, &GameList::SetDefaultISO); const auto blob_type = game->GetBlobType(); - if (game->IsVolumeSizeAccurate()) + if (can_convert(game)) menu->addAction(tr("Convert File..."), this, &GameList::ConvertFile); QAction* change_disc = menu->addAction(tr("Change &Disc"), this, &GameList::ChangeDisc); |
