1
0
mirror of https://github.com/libretro/RetroArch synced 2025-02-28 22:13:51 +00:00

Merge pull request from Jamiras/cheevos_emu_cheat_hardcore_toggle

(cheevos) prevent hardcore toggle when emu-handled cheats are active
This commit is contained in:
Autechre 2021-01-12 16:31:15 +01:00 committed by GitHub
commit 0ce218e20a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);