DolphinWX: Only read titles.txt once

titles.txt is read into a map and passed to the GameListItem
constructor, making game list scanning a bit more efficient.

ISOPropreties's constructor is changed to take a GameListItem as an
argument instead of creating one on its own, because ISOPropreties
doesn't have the titles.txt map that the GameListItem constructor wants.
This commit is contained in:
JosJuice
2015-09-13 14:17:58 +02:00
parent 10aafff5b9
commit 210aa774d5
6 changed files with 57 additions and 53 deletions

View File

@ -87,7 +87,7 @@ void CreateCodeDialog::PressOK(wxCommandEvent& ev)
// pretty hacky - add the code to the gameini
{
CISOProperties isoprops(SConfig::GetInstance().m_LastFilename, this);
CISOProperties isoprops(GameListItem(SConfig::GetInstance().m_LastFilename, std::unordered_map<std::string, std::string>()), this);
// add the code to the isoproperties arcode list
arCodes->push_back(new_cheat);
// save the gameini