mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 05:38:50 +00:00
GameList: Show (Disc 1) for first disc of two-disc games
Append disc label to the first disc of two-disc games too, rather than only labelling the second disc.
This commit is contained in:
parent
1fa5c3485c
commit
37b89d5b71
4 changed files with 82 additions and 6 deletions
|
@ -92,14 +92,14 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const
|
|||
{
|
||||
QString name = QString::fromStdString(game.GetName(m_title_database));
|
||||
|
||||
// Add disc numbers > 1 to title if not present.
|
||||
const int disc_nr = game.GetDiscNumber() + 1;
|
||||
if (disc_nr > 1)
|
||||
const int disc_number = game.GetDiscNumber() + 1;
|
||||
if (disc_number > 1 || game.IsTwoDiscGame())
|
||||
{
|
||||
if (!name.contains(QRegularExpression(QStringLiteral("disc ?%1").arg(disc_nr),
|
||||
// Add disc number to title if not present.
|
||||
if (!name.contains(QRegularExpression(QStringLiteral("disc ?%1").arg(disc_number),
|
||||
QRegularExpression::CaseInsensitiveOption)))
|
||||
{
|
||||
name.append(tr(" (Disc %1)").arg(disc_nr));
|
||||
name.append(tr(" (Disc %1)").arg(disc_number));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue