Skip to content

Commit

Permalink
Fixed reading custom titles for WAD files from titles.txt
Browse files Browse the repository at this point in the history
GameTDB, along with many other websites, only use 4 characters for the
GameID for WAD files. This means we should ignore the publisher ID when
comparing our Game ID to external databases.
  • Loading branch information
Stevoisiak committed Mar 21, 2015
1 parent 9c07934 commit 030083b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Source/Core/DolphinWX/GameListCtrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,19 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
if (!std::getline(titlestxt, line) && titlestxt.eof())
break;

if (line.substr(0,rISOFile.GetUniqueID().size()) == rISOFile.GetUniqueID())
if (line.substr(0, rISOFile.GetUniqueID().size()) == rISOFile.GetUniqueID())
{
name = line.substr(rISOFile.GetUniqueID().size() + 3);
break;
}
// Ignore publisher ID for WAD files
// TODO: Create function in volume class to fetch Game ID without the publisher code
else if (rISOFile.GetPlatform() == GameListItem::WII_WAD
&& line.substr(0, rISOFile.GetUniqueID().size() - 2) == (rISOFile.GetUniqueID()).substr(0, rISOFile.GetUniqueID().size() - 2) )
{
name = line.substr(rISOFile.GetUniqueID().size() + 1);
break;
}
}
titlestxt.close();
}
Expand Down

0 comments on commit 030083b

Please sign in to comment.