mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-21 03:54:57 +00:00
Improve parsing custom game titles from titles.txt
Read game ID based on position of the "=" sign, rather than assuming game IDs are 6 characters in length.
This commit is contained in:
parent
c2bbcdd16c
commit
90167abe0f
1 changed files with 3 additions and 2 deletions
|
@ -407,9 +407,10 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
|
|||
if (!std::getline(titlestxt, line) && titlestxt.eof())
|
||||
break;
|
||||
|
||||
if (line.substr(0,rISOFile.GetUniqueID().size()) == rISOFile.GetUniqueID())
|
||||
const size_t equals_index = line.find('=');
|
||||
if (line.substr(0, equals_index - 1) == rISOFile.GetUniqueID())
|
||||
{
|
||||
name = StrToWxStr(line.substr(rISOFile.GetUniqueID().size() + 3));
|
||||
name = StrToWxStr(line.substr(equals_index + 2));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue