Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Properly sort multi-disc games by title.
  • Loading branch information
RachelBryk committed Jan 25, 2013
1 parent 10418d4 commit 2cc1a97
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Source/Core/DolphinWX/Src/GameListCtrl.cpp
Expand Up @@ -94,6 +94,18 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
switch(sortData)
{
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(),
iso2->GetName(indexOther).c_str()) * t;
case CGameListCtrl::COLUMN_NOTES:
Expand Down

0 comments on commit 2cc1a97

Please sign in to comment.