mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-12 22:56:52 +01: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
@ -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…
x
Reference in New Issue
Block a user