mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Android: Only allow conversion when appropriate
This commit is contained in:
@ -267,9 +267,8 @@ void GameList::ShowContextMenu(const QPoint&)
|
||||
{
|
||||
const auto selected_games = GetSelectedGames();
|
||||
|
||||
if (std::all_of(selected_games.begin(), selected_games.end(), [](const auto& game) {
|
||||
return DiscIO::IsDisc(game->GetPlatform()) && game->IsVolumeSizeAccurate();
|
||||
}))
|
||||
if (std::all_of(selected_games.begin(), selected_games.end(),
|
||||
[](const auto& game) { return game->ShouldAllowConversion(); }))
|
||||
{
|
||||
menu->addAction(tr("Convert Selected Files..."), this, &GameList::ConvertFile);
|
||||
menu->addSeparator();
|
||||
@ -301,7 +300,7 @@ void GameList::ShowContextMenu(const QPoint&)
|
||||
{
|
||||
menu->addAction(tr("Set as &Default ISO"), this, &GameList::SetDefaultISO);
|
||||
|
||||
if (game->IsVolumeSizeAccurate())
|
||||
if (game->ShouldAllowConversion())
|
||||
menu->addAction(tr("Convert File..."), this, &GameList::ConvertFile);
|
||||
|
||||
QAction* change_disc = menu->addAction(tr("Change &Disc"), this, &GameList::ChangeDisc);
|
||||
|
@ -672,6 +672,11 @@ std::string GameFile::GetFileFormatName() const
|
||||
}
|
||||
}
|
||||
|
||||
bool GameFile::ShouldAllowConversion() const
|
||||
{
|
||||
return DiscIO::IsDisc(m_platform) && m_volume_size_is_accurate;
|
||||
}
|
||||
|
||||
const GameBanner& GameFile::GetBannerImage() const
|
||||
{
|
||||
return m_custom_banner.empty() ? m_volume_banner : m_custom_banner;
|
||||
|
@ -101,6 +101,7 @@ public:
|
||||
const std::string& GetCompressionMethod() const { return m_compression_method; }
|
||||
bool ShouldShowFileFormatDetails() const;
|
||||
std::string GetFileFormatName() const;
|
||||
bool ShouldAllowConversion() const;
|
||||
const std::string& GetApploaderDate() const { return m_apploader_date; }
|
||||
u64 GetFileSize() const { return m_file_size; }
|
||||
u64 GetVolumeSize() const { return m_volume_size; }
|
||||
|
Reference in New Issue
Block a user