mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-17 22:55:38 +00:00
Games marked not to be counted are now also excluded from the 'Recent' and 'Favorites' collections.
Also fixed a crash when opening the game options menu when a placeholder was selected.
This commit is contained in:
parent
22ed97c6d8
commit
3a59c77d3e
|
@ -281,8 +281,7 @@ void CollectionSystemManager::refreshCollectionSystems(FileData* file)
|
|||
|
||||
void CollectionSystemManager::updateCollectionSystem(FileData* file, CollectionSystemData sysData)
|
||||
{
|
||||
if (sysData.isPopulated)
|
||||
{
|
||||
if (sysData.isPopulated) {
|
||||
// Collection files use the full path as key, to avoid clashes.
|
||||
std::string key = file->getFullPath();
|
||||
|
||||
|
@ -316,7 +315,7 @@ void CollectionSystemManager::updateCollectionSystem(FileData* file, CollectionS
|
|||
ViewController::get()->
|
||||
getGameListView(curSys).get()->remove(collectionEntry, false);
|
||||
}
|
||||
else if (name == "all" && !file->getCountAsGame()) {
|
||||
else if (curSys->isCollection() && !file->getCountAsGame()) {
|
||||
// If the countasgame flag has been set to false, then remove the game.
|
||||
ViewController::get()->
|
||||
getGameListView(curSys).get()->remove(collectionEntry, false);
|
||||
|
@ -331,9 +330,10 @@ void CollectionSystemManager::updateCollectionSystem(FileData* file, CollectionS
|
|||
else {
|
||||
bool addGame = false;
|
||||
// We didn't find it here - we need to check if we should add it.
|
||||
if (name == "recent" && file->metadata.get("playcount") > "0" &&
|
||||
includeFileInAutoCollections(file) || name == "favorites" &&
|
||||
file->metadata.get("favorite") == "true")
|
||||
if ((name == "recent" && file->metadata.get("playcount") > "0" &&
|
||||
file->getCountAsGame() && includeFileInAutoCollections(file)) ||
|
||||
(name == "favorites" && file->metadata.get("favorite") == "true" &&
|
||||
file->getCountAsGame()))
|
||||
addGame = true;
|
||||
else if (name == "all" && file->getCountAsGame())
|
||||
addGame = true;
|
||||
|
@ -839,7 +839,7 @@ void CollectionSystemManager::populateAutoCollection(CollectionSystemData* sysDa
|
|||
|
||||
if (include) {
|
||||
// Exclude files that are set not to be counted as games.
|
||||
if (rootFolder->getName() == "all" && !(*gameIt)->getCountAsGame())
|
||||
if (!(*gameIt)->getCountAsGame())
|
||||
continue;
|
||||
|
||||
CollectionFileData* newGame = new CollectionFileData(*gameIt, newSys);
|
||||
|
|
|
@ -42,6 +42,7 @@ GuiGamelistOptions::GuiGamelistOptions(
|
|||
// Read the setting for whether folders are sorted on top of the gamelists.
|
||||
// Also check if the gamelist only contains folders, as generated by the FileData sorting.
|
||||
mFoldersOnTop = Settings::getInstance()->getBool("FoldersOnTop");
|
||||
if (file->getType() != PLACEHOLDER)
|
||||
mOnlyHasFolders = file->getParent()->getOnlyFoldersFlag();
|
||||
|
||||
// Read the applicable favorite sorting setting depending on whether the
|
||||
|
|
Loading…
Reference in a new issue