Skip to content

Commit

Permalink
RetroAchievements: Skip LoadApprovedList if there are no patches
Browse files Browse the repository at this point in the history
There being no active patches is by far the most common case, so let's
optimize for this case.
  • Loading branch information
JosJuice committed Jul 9, 2024
1 parent f596788 commit e6b9091
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/Core/Core/AchievementManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,12 @@ bool AchievementManager::IsHardcoreModeActive() const
void AchievementManager::FilterApprovedPatches(std::vector<PatchEngine::Patch>& patches,
const std::string& game_ini_id) const
{
if (patches.empty())
{
// There's nothing to verify, so let's save ourselves some work
return;
}

std::lock_guard lg{m_lock};

if (!IsHardcoreModeActive())
Expand Down

0 comments on commit e6b9091

Please sign in to comment.