mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-11 06:59:07 +01:00
Merge pull request #2179 from RachelBryk/sort
Consistently sort games with the same name but different revision or reg...
This commit is contained in:
commit
9ccc236b9c
@ -128,10 +128,12 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
|
|||||||
case CGameListCtrl::COLUMN_TITLE:
|
case CGameListCtrl::COLUMN_TITLE:
|
||||||
if (!strcasecmp(iso1->GetName(indexOne).c_str(),iso2->GetName(indexOther).c_str()))
|
if (!strcasecmp(iso1->GetName(indexOne).c_str(),iso2->GetName(indexOther).c_str()))
|
||||||
{
|
{
|
||||||
if (iso1->IsDiscTwo())
|
if (iso1->GetUniqueID() != iso2->GetUniqueID())
|
||||||
return 1 * t;
|
return t * (iso1->GetUniqueID() > iso2->GetUniqueID() ? 1 : -1);
|
||||||
else if (iso2->IsDiscTwo())
|
if (iso1->GetRevision() != iso2->GetRevision())
|
||||||
return -1 * t;
|
return t * (iso1->GetRevision() > iso2->GetRevision() ? 1 : -1);
|
||||||
|
if (iso1->IsDiscTwo() != iso2->IsDiscTwo())
|
||||||
|
return t * iso1->IsDiscTwo() ? 1 : -1;
|
||||||
}
|
}
|
||||||
return strcasecmp(iso1->GetName(indexOne).c_str(),
|
return strcasecmp(iso1->GetName(indexOne).c_str(),
|
||||||
iso2->GetName(indexOther).c_str()) * t;
|
iso2->GetName(indexOther).c_str()) * t;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user