Properly sort multi-disc games by title.
This commit is contained in:
parent
10418d449f
commit
2cc1a97a66
|
@ -94,6 +94,18 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
|
||||||
switch(sortData)
|
switch(sortData)
|
||||||
{
|
{
|
||||||
case CGameListCtrl::COLUMN_TITLE:
|
case CGameListCtrl::COLUMN_TITLE:
|
||||||
|
if (!strcasecmp(iso1->GetName(indexOne).c_str(),iso2->GetName(indexOther).c_str()))
|
||||||
|
{
|
||||||
|
File::IOFile file(iso1->GetFileName(),"rb");
|
||||||
|
u8 discNum;
|
||||||
|
file.Seek(6,0);
|
||||||
|
file.ReadBytes(&discNum, 1);
|
||||||
|
file.Close();
|
||||||
|
if (discNum == 1)
|
||||||
|
return 1 * t;
|
||||||
|
else
|
||||||
|
return -1 * t;
|
||||||
|
}
|
||||||
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;
|
||||||
case CGameListCtrl::COLUMN_NOTES:
|
case CGameListCtrl::COLUMN_NOTES:
|
||||||
|
|
Loading…
Reference in New Issue