CodeWidgets: Show code approval in Hardcore mode
When Hardcore mode is enabled, show an icon for each code in ARCodeWidget and GeckoCodeWidget indicating whether it's an approved code or not.
This commit is contained in:
1 parent
2b7faeb920
commit
44f6743a5b
6 files changed
+123
-41
No files matched your search
@@ -59,11 +59,11 @@ void SetActiveCodes(std::span<const GeckoCode> gcodes, const std::string& game_i
|
||||
{
|
||||
s_active_codes.reserve(gcodes.size());
|
||||
|
||||
const auto should_be_activated = [&game_id, &revision](const GeckoCode& code) {
|
||||
return AchievementManager::GetInstance().ShouldGeckoCodeBeActivated(code, game_id, revision);
|
||||
};
|
||||
std::copy_if(gcodes.begin(), gcodes.end(), std::back_inserter(s_active_codes),
|
||||
[&game_id, &revision](const GeckoCode& code) {
|
||||
return code.enabled && AchievementManager::GetInstance().CheckApprovedGeckoCode(
|
||||
code, game_id, revision);
|
||||
});
|
||||
should_be_activated);
|
||||
}
|
||||
s_active_codes.shrink_to_fit();
|
||||
|
||||
|
||||
Reference in new issue
Block a user