diff --git a/cheevos/cheevos.c b/cheevos/cheevos.c index 12c431dac8..0e91fae1d7 100644 --- a/cheevos/cheevos.c +++ b/cheevos/cheevos.c @@ -748,9 +748,13 @@ static int rcheevos_parse( else { CHEEVOS_ERR(RCHEEVOS_TAG "No memory exposed by core.\n"); + rcheevos_locals.core_supports = false; if (settings->bools.cheevos_verbose_enable) - runloop_msg_queue_push("Cannot activate achievements using this core.", 0, 4 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_WARNING); + { + runloop_msg_queue_push(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CANNOT_ACTIVATE_ACHIEVEMENTS_WITH_THIS_CORE), + 0, 4 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_WARNING); + } goto error; } @@ -1207,7 +1211,15 @@ void rcheevos_populate_menu(void* data) if (i == 0) { - if (!settings->arrays.cheevos_token[0]) + if (!rcheevos_locals.core_supports) + { + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CANNOT_ACTIVATE_ACHIEVEMENTS_WITH_THIS_CORE), + msg_hash_to_str(MENU_ENUM_LABEL_CANNOT_ACTIVATE_ACHIEVEMENTS_WITH_THIS_CORE), + MENU_ENUM_LABEL_CANNOT_ACTIVATE_ACHIEVEMENTS_WITH_THIS_CORE, + FILE_TYPE_NONE, 0, 0); + } + else if (!settings->arrays.cheevos_token[0]) { menu_entries_append_enum(info->list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_LOGGED_IN), @@ -1743,11 +1755,15 @@ void rcheevos_test(void) if (!rcheevos_memory_init(&rcheevos_locals.memory, rcheevos_locals.patchdata.console_id)) { CHEEVOS_ERR(RCHEEVOS_TAG "No memory exposed by core\n"); + rcheevos_locals.core_supports = false; if (settings && settings->bools.cheevos_verbose_enable) - runloop_msg_queue_push("Cannot activate achievements using this core.", 0, 4 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_WARNING); + { + runloop_msg_queue_push(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CANNOT_ACTIVATE_ACHIEVEMENTS_WITH_THIS_CORE), + 0, 4 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_WARNING); + } - rcheevos_locals.loaded = false; + rcheevos_unload(); rcheevos_pause_hardcore(); return; } diff --git a/cheevos/cheevos_parser.c b/cheevos/cheevos_parser.c index fe70e20723..163a4634c1 100644 --- a/cheevos/cheevos_parser.c +++ b/cheevos/cheevos_parser.c @@ -606,6 +606,8 @@ void rcheevos_free_patchdata(rcheevos_rapatchdata_t* patchdata) patchdata->core = NULL; patchdata->unofficial = NULL; patchdata->lboards = NULL; + patchdata->title = NULL; + patchdata->richpresence_script = NULL; patchdata->core_count = 0; patchdata->unofficial_count = 0; patchdata->lboard_count = 0; diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index f6c3304b43..8e7b9e6e67 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -6842,6 +6842,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NOT_LOGGED_IN, "Not logged in" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CANNOT_ACTIVATE_ACHIEVEMENTS_WITH_THIS_CORE, + "Cannot activate achievements using this core" +) /* Quick Menu > Information */ diff --git a/msg_hash.h b/msg_hash.h index 26f7a65e62..925ceaec26 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -1263,6 +1263,7 @@ enum msg_hash_enums MENU_LABEL(MENU_THROTTLE_FRAMERATE), MENU_LABEL(NO_ACHIEVEMENTS_TO_DISPLAY), MENU_LABEL(NOT_LOGGED_IN), + MENU_LABEL(CANNOT_ACTIVATE_ACHIEVEMENTS_WITH_THIS_CORE), MENU_LABEL(NO_ENTRIES_TO_DISPLAY), MENU_LABEL(DOWNLOAD_PL_ENTRY_THUMBNAILS), diff --git a/retroarch.c b/retroarch.c index df43a338fb..57b3f1afd5 100644 --- a/retroarch.c +++ b/retroarch.c @@ -12321,6 +12321,11 @@ static bool command_event_init_core( config_load_override(&p_rarch->runloop_system); #endif +#ifdef HAVE_CHEEVOS + /* assume the core supports achievements unless it tells us otherwise */ + rcheevos_set_support_cheevos(true); +#endif + /* Load auto-shaders on the next occasion */ #if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL) p_rarch->shader_presets_need_reload = true;