GS-HW: Fix std::sort comparator for purging hash cache

This commit is contained in:
refractionpcsx2 committed 2023-04-27 09:07:21 +01:00
1 parent 5a73fa2d23
commit cdd88a6e5c
1 file changed
+1 -1
+1 -1
View File
@@ -3756,7 +3756,7 @@ void GSTextureCache::AgeHashCache()
if (might_need_cache_purge)
{
std::sort(s_hash_cache_purge_list.begin(), s_hash_cache_purge_list.end(),
[](const auto& lhs, const auto& rhs) { return lhs.second - rhs.second; });
[](const auto& lhs, const auto& rhs) { return lhs.second > rhs.second; });
const u32 entries_to_purge = std::min(static_cast<u32>(m_hash_cache.size() - MAX_HASH_CACHE_SIZE),
static_cast<u32>(s_hash_cache_purge_list.size()));