Fixed an issue where hiding a folder was not immediately reflected in the gamelist.

Improved the debug logging for hidden games as well and adjusted the hidden text opacity slightly.
This commit is contained in:
Leon Styhre 2020-08-06 18:16:31 +02:00
parent 2a3d78bef2
commit 22ed97c6d8
4 changed files with 13 additions and 3 deletions

View file

@ -21,6 +21,7 @@ Many bugs have been fixed, and numerous features that were only partially implem
* New game media file logic using a media directory with files matching the ROM names instead of pointing to the media files in gamelist.xml
* Updated scraper to support additional media files, detailed configuration of what to scrape, semi-automatic mode etc.
* In the metadata editor, any values updated by the single-game scraper or by the user are now highlighted using a different font color
* Files or folders can now be flagged for exclusion when scraping with the multi-scraper, and for folders it can be set to apply recursively
* Gamelist sorting now working as expected and is persistent throughout the application session
* Added support for jumping to the start and end of gamelists and menus using the controller trigger buttons (or equivalent keyboard mappings)
* Full navigation sound support, configurable per theme with a fallback to the built-in sounds if the theme does not support it

View file

@ -440,7 +440,7 @@ void FileData::sort(ComparisonFunction& comparator, bool ascending)
for (unsigned int i = 0; i < mChildren.size(); i++) {
if (mChildren[i]->getHidden()) {
LOG(LogDebug) << "FileData::sort(): Skipping hidden game '" <<
mChildren[i]->getName() << "'";
mChildren[i]->getName() << "'" << " (" << mChildren[i]->getPath() << ").";
continue;
}
mChildrenShown.push_back(mChildren[i]);
@ -518,7 +518,7 @@ void FileData::sortFavoritesOnTop(ComparisonFunction& comparator, bool ascending
// Exclude game if it's marked as hidden and the hide setting has been set.
if (!showHiddenGames && mChildren[i]->getHidden()) {
LOG(LogDebug) << "FileData::sortFavoritesOnTop(): Skipping hidden game '" <<
mChildren[i]->getName() << "'";
mChildren[i]->getName() << "'" << " (" << mChildren[i]->getPath() << ").";
continue;
}

View file

@ -376,6 +376,15 @@ void GuiMetaDataEd::save()
// Update respective Collection Entries.
CollectionSystemManager::get()->refreshCollectionSystems(mScraperParams.game);
// If hiding a folder and the hide games flag is enabled, we need to manually sort
// and reload the gamelist as CollectionSystemManager ignores folders.
if (hideGameWhileHidden && mScraperParams.game->getType() == FOLDER) {
FileData* systemRoot = mScraperParams.system->getRootFolder();
systemRoot->sort(getSortTypeFromString(systemRoot->getSortTypeString()),
Settings::getInstance()->getBool("FavoritesFirst"));
ViewController::get()->reloadGameListView(mScraperParams.system);
}
mScraperParams.system->onMetaDataSavePoint();
}

View file

@ -219,7 +219,7 @@ void TextListComponent<T>::render(const Transform4x4f& parentTrans)
// If a game is marked as hidden, lower the text opacity quite a lot.
// For games marked not to be counted, lower the opacity moderately.
if (entry.object->getHidden())
entry.data.textCache->setColor(color & 0xFFFFFF33);
entry.data.textCache->setColor(color & 0xFFFFFF44);
else if (!entry.object->getCountAsGame())
entry.data.textCache->setColor(color & 0xFFFFFF77);
else