From 67f874250aebb57b0ef69071b54200952f6b1404 Mon Sep 17 00:00:00 2001 From: spycrab Date: Fri, 4 May 2018 16:46:33 +0200 Subject: [PATCH] Qt: Show disc number --- Source/Core/DolphinQt2/GameList/GameListModel.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt2/GameList/GameListModel.cpp b/Source/Core/DolphinQt2/GameList/GameListModel.cpp index f332947b28..e57ac80f77 100644 --- a/Source/Core/DolphinQt2/GameList/GameListModel.cpp +++ b/Source/Core/DolphinQt2/GameList/GameListModel.cpp @@ -74,7 +74,18 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const break; case COL_TITLE: if (role == Qt::DisplayRole || role == Qt::InitialSortOrderRole) - return QString::fromStdString(game.GetName()); + { + QString name = QString::fromStdString(game.GetName()); + const int disc_nr = game.GetDiscNumber() + 1; + if (disc_nr > 1) + { + if (!name.contains(QRegExp(QStringLiteral("disc ?%1").arg(disc_nr), Qt::CaseInsensitive))) + { + name.append(tr(" (Disc %1)").arg(disc_nr)); + } + } + return name; + } break; case COL_ID: if (role == Qt::DisplayRole || role == Qt::InitialSortOrderRole)