From 6dc88622208100b9fb01fe2873adb72abad25562 Mon Sep 17 00:00:00 2001 From: radius Date: Tue, 9 Oct 2018 19:07:05 -0500 Subject: [PATCH] [cheevos] autoload state may kick in before achievements are loaded, disable autoload state altogether if cheevos hardcode is enabled --- command.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/command.c b/command.c index f52fcee785..5bee7d0d08 100644 --- a/command.c +++ b/command.c @@ -1278,6 +1278,7 @@ static bool event_init_content(void) { bool contentless = false; bool is_inited = false; + settings_t *settings = config_get_ptr(); content_get_status(&contentless, &is_inited); @@ -1304,7 +1305,18 @@ static bool event_init_content(void) RARCH_LOG("%s.\n", msg_hash_to_str(MSG_SKIPPING_SRAM_LOAD)); +/* + Since the operations are asynchronouse we can't guarantee users will not use auto_load_state to cheat on + achievements so we forbid auto_load_state from happening if cheevos_enable and cheevos_hardcode_mode_enable + are true +*/ +#ifdef HAVE_CHEEVOS + if (!settings->bools.cheevos_enable || !settings->bools.cheevos_hardcore_mode_enable) + command_event_load_auto_state(); +#else command_event_load_auto_state(); +#endif + command_event(CMD_EVENT_BSV_MOVIE_INIT, NULL); command_event(CMD_EVENT_NETPLAY_INIT, NULL);