Only use header caching when in god mode

Because header caching doesn't filter categories or age restricted games.
This commit is contained in:
wiidev 2021-04-04 19:00:02 +01:00
parent 64bfd820bb
commit e6832e143c

View File

@ -345,7 +345,7 @@ int GameList::FilterList(const wchar_t *gameFilter)
}
}
if (Settings.UseGameHeaderCache && allType == ENABLED && isCacheFile(FilteredListCacheFileName(gameFilter)))
if (Settings.UseGameHeaderCache && allType == ENABLED && Settings.godmode && isCacheFile(FilteredListCacheFileName(gameFilter)))
{
LoadFilteredListCache(FilteredList, GameFilter.c_str());
GuiSearchBar::FilterList(FilteredList, GameFilter);
@ -374,7 +374,7 @@ int GameList::FilterList(const wchar_t *gameFilter)
SortList();
if (Settings.UseGameHeaderCache && allType == ENABLED && !FilteredList.empty() && (Settings.GameSort & SORT_RANKING) == 0 && (Settings.GameSort & SORT_PLAYCOUNT) == 0 && (Settings.GameSort & SORT_FAVORITE) == 0)
if (Settings.UseGameHeaderCache && allType == ENABLED && Settings.godmode && !FilteredList.empty() && (Settings.GameSort & SORT_RANKING) == 0 && (Settings.GameSort & SORT_PLAYCOUNT) == 0 && (Settings.GameSort & SORT_FAVORITE) == 0)
SaveFilteredListCache(FilteredList, GameFilter.c_str());
return FilteredList.size();