mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-29 19:55:37 +00:00
Merge pull request #285 from tomaz82/fix_hidden
Add SystemData::indexAllGameFilters (fixes bug #281)
This commit is contained in:
commit
f8a297ff51
|
@ -144,14 +144,6 @@ void parseGamelist(SystemData* system)
|
||||||
file->metadata.set("name", defaultName);
|
file->metadata.set("name", defaultName);
|
||||||
|
|
||||||
file->metadata.resetChangedFlag();
|
file->metadata.resetChangedFlag();
|
||||||
|
|
||||||
// index if it's a game!
|
|
||||||
if(type == GAME)
|
|
||||||
{
|
|
||||||
FileFilterIndex* index = system->getIndex();
|
|
||||||
index->addToIndex(file);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,8 @@ SystemData::SystemData(const std::string& name, const std::string& fullName, Sys
|
||||||
parseGamelist(this);
|
parseGamelist(this);
|
||||||
|
|
||||||
mRootFolder->sort(FileSorts::SortTypes.at(0));
|
mRootFolder->sort(FileSorts::SortTypes.at(0));
|
||||||
|
|
||||||
|
indexAllGameFilters(mRootFolder);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -145,6 +147,20 @@ void SystemData::populateFolder(FileData* folder)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SystemData::indexAllGameFilters(const FileData* folder)
|
||||||
|
{
|
||||||
|
const std::vector<FileData*>& children = folder->getChildren();
|
||||||
|
|
||||||
|
for(std::vector<FileData*>::const_iterator it = children.begin(); it != children.end(); ++it)
|
||||||
|
{
|
||||||
|
switch((*it)->getType())
|
||||||
|
{
|
||||||
|
case GAME: { mFilterIndex->addToIndex(*it); } break;
|
||||||
|
case FOLDER: { indexAllGameFilters(*it); } break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<std::string> readList(const std::string& str, const char* delims = " \t\r\n,")
|
std::vector<std::string> readList(const std::string& str, const char* delims = " \t\r\n,")
|
||||||
{
|
{
|
||||||
std::vector<std::string> ret;
|
std::vector<std::string> ret;
|
||||||
|
|
|
@ -77,6 +77,7 @@ private:
|
||||||
std::shared_ptr<ThemeData> mTheme;
|
std::shared_ptr<ThemeData> mTheme;
|
||||||
|
|
||||||
void populateFolder(FileData* folder);
|
void populateFolder(FileData* folder);
|
||||||
|
void indexAllGameFilters(const FileData* folder);
|
||||||
void setIsGameSystemStatus();
|
void setIsGameSystemStatus();
|
||||||
|
|
||||||
FileFilterIndex* mFilterIndex;
|
FileFilterIndex* mFilterIndex;
|
||||||
|
|
Loading…
Reference in a new issue