prevent hardcore toggle when emu-handled cheats are active

This commit is contained in:
Jamiras 2021-01-11 20:34:13 -07:00
parent 41981f62e1
commit 75fad11c27

View File

@ -50,6 +50,10 @@
#include "../network/discord.h"
#endif
#ifdef HAVE_CHEATS
#include "../cheat_manager.h"
#endif
#include "badges.h"
#include "cheevos.h"
#include "cheevos_memory.h"
@ -1497,6 +1501,13 @@ static void rcheevos_toggle_hardcore_active(rcheevos_locals_t* locals)
if (!locals->hardcore_active)
return;
#ifdef HAVE_CHEATS
/* if one or more emulator managed cheats is active, abort */
cheat_manager_apply_cheats();
if (!locals->hardcore_active)
return;
#endif
if (locals->loaded)
{
const char* msg = msg_hash_to_str(MSG_CHEEVOS_HARDCORE_MODE_ENABLE);