From 6cc772e71e6be1efb01520bcb0e145989ca98a48 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 8 Jun 2024 11:55:55 +0200 Subject: [PATCH] Unlock any eligible new achievements that may have been added. --- profiler/src/profiler/TracyAchievements.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/profiler/src/profiler/TracyAchievements.cpp b/profiler/src/profiler/TracyAchievements.cpp index 584cd5b9..bd2c1dce 100644 --- a/profiler/src/profiler/TracyAchievements.cpp +++ b/profiler/src/profiler/TracyAchievements.cpp @@ -43,6 +43,23 @@ AchievementsMgr::AchievementsMgr() } } + for( auto& v : m_map ) + { + auto& it = v.second.item; + if( it->doneTime > 0 ) + { + auto c = it->items; + if( c ) + { + while( *c ) + { + if( (*c)->unlockTime == 0 ) (*c)->unlockTime = it->doneTime; + c++; + } + } + } + } + ini_free( ini ); }