Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #8878 from JosJuice/actually-disable-tgc-conversion
DolphinQt: Actually disable converting from TGC
  • Loading branch information
Tilka committed Jun 16, 2020
2 parents a2b7627 + c236d89 commit de5941d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Source/Core/DolphinQt/GameList/GameList.cpp
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit de5941d

Please sign in to comment.