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

@ -19,6 +19,7 @@
#include "DiscIO/Volume.h"
#include "DiscIO/VolumeCreator.h"
#include "DolphinWX/ARCodeAddEdit.h"
#include "DolphinWX/ISOFile.h"
#include "DolphinWX/PatchAddEdit.h"
class GameListItem;
@ -58,7 +59,7 @@ struct PHackData
class CISOProperties : public wxDialog
{
public:
CISOProperties(const std::string& fileName,
CISOProperties(const GameListItem& game_list_item,
wxWindow* parent,
wxWindowID id = wxID_ANY,
const wxString& title = _("Properties"),
@ -215,7 +216,7 @@ private:
void SetRefresh(wxCommandEvent& event);
void OnChangeBannerLang(wxCommandEvent& event);
GameListItem* OpenGameListItem;
const GameListItem OpenGameListItem;
typedef std::vector<const DiscIO::SFileInfo*>::iterator fileIter;