Merge pull request #7748 from jordan-woyak/compressed-game-indicator

DolphinQt: Display game list compressed file sizes with an asterisk.
This commit is contained in:
JosJuice 2019-01-30 19:47:47 +01:00 committed by GitHub
commit 419ba925b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -135,7 +135,15 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const
break;
case COL_SIZE:
if (role == Qt::DisplayRole)
return QString::fromStdString(UICommon::FormatSize(game.GetFileSize()));
{
std::string str = UICommon::FormatSize(game.GetFileSize());
// Add asterisk to size of compressed files.
if (game.GetFileSize() != game.GetVolumeSize())
str += '*';
return QString::fromStdString(str);
}
if (role == Qt::InitialSortOrderRole)
return static_cast<quint64>(game.GetFileSize());
break;