1
0
mirror of https://github.com/libretro/RetroArch synced 2025-02-21 18:40:09 +00:00

Merge pull request from Jamiras/cheevos_softcore_active

(cheevos) fix need-to-activate achievement logic for non-hardcore
This commit is contained in:
Autechre 2021-11-08 18:10:00 +01:00 committed by GitHub
commit 7c84a26563
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -239,13 +239,12 @@ static void rcheevos_activate_achievements(void)
int result;
rcheevos_racheevo_t* achievement = rcheevos_locals.game.achievements;
settings_t* settings = config_get_ptr();
const uint8_t active_flag = rcheevos_locals.hardcore_active ? RCHEEVOS_ACTIVE_HARDCORE : RCHEEVOS_ACTIVE_SOFTCORE;
for (i = 0; i < rcheevos_locals.game.achievement_count;
i++, achievement++)
{
if ((achievement->active & (RCHEEVOS_ACTIVE_HARDCORE | RCHEEVOS_ACTIVE_SOFTCORE)) != 0)
{
if (!rcheevos_locals.hardcore_active || (achievement->active & RCHEEVOS_ACTIVE_HARDCORE) != 0)
if ((achievement->active & active_flag) != 0)
{
result = rc_runtime_activate_achievement(&rcheevos_locals.runtime, achievement->id, achievement->memaddr, NULL, 0);
if (result != RC_OK)
@ -268,7 +267,6 @@ static void rcheevos_activate_achievements(void)
}
}
}
}
}
static rcheevos_racheevo_t* rcheevos_find_cheevo(unsigned id)