mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-05-12 03:02:01 -04:00
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:
@@ -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