diff --git a/cheevos.c b/cheevos.c index d9c2127a4c..982b54235a 100644 --- a/cheevos.c +++ b/cheevos.c @@ -2566,7 +2566,7 @@ void cheevos_reset_game(void) } } -void cheevos_populate_menu(void *data) +void cheevos_populate_menu(void *data, bool hardcore) { #ifdef HAVE_MENU unsigned i; @@ -2579,15 +2579,42 @@ void cheevos_populate_menu(void *data) for (i = 0; cheevo < end; i++, cheevo++) { - if (!cheevo->active) + if (!hardcore) { - menu_entries_append_enum(info->list, cheevo->title, - cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY, - MENU_SETTINGS_CHEEVOS_START + i, 0, 0); - items_found++; + if (!(cheevo->active & CHEEVOS_ACTIVE_SOFTCORE)) + { + menu_entries_append_enum(info->list, cheevo->title, + cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY, + MENU_SETTINGS_CHEEVOS_START + i, 0, 0); + items_found++; + } + else + { + menu_entries_append_enum(info->list, cheevo->title, + cheevo->description, MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY, + MENU_SETTINGS_CHEEVOS_START + i, 0, 0); + items_found++; + } + } + else + { + if (!(cheevo->active & CHEEVOS_ACTIVE_HARDCORE)) + { + menu_entries_append_enum(info->list, cheevo->title, + cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY, + MENU_SETTINGS_CHEEVOS_START + i, 0, 0); + items_found++; + } + else + { + menu_entries_append_enum(info->list, cheevo->title, + cheevo->description, MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY, + MENU_SETTINGS_CHEEVOS_START + i, 0, 0); + items_found++; + } } } - +/* if (settings->cheevos.test_unofficial) { cheevo = cheevos_locals.unofficial.cheevos; @@ -2634,7 +2661,7 @@ void cheevos_populate_menu(void *data) } } } - +*/ if (items_found == 0) { menu_entries_append_enum(info->list, diff --git a/cheevos.h b/cheevos.h index 9b8985a6d2..7c350460a9 100644 --- a/cheevos.h +++ b/cheevos.h @@ -43,7 +43,7 @@ bool cheevos_load(const void *data); void cheevos_reset_game(void); -void cheevos_populate_menu(void *data); +void cheevos_populate_menu(void *data, bool hardcore); bool cheevos_get_description(cheevos_ctx_desc_t *desc); diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 1ece1bacfb..4a4ef7c9ce 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -6,6 +6,8 @@ MSG_HASH(MENU_ENUM_LABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, "retro_achievements") MSG_HASH(MENU_ENUM_LABEL_ACHIEVEMENT_LIST, "achievement_list") +MSG_HASH(MENU_ENUM_LABEL_ACHIEVEMENT_LIST_HARDCORE, + "achievement_list_hardcore") MSG_HASH(MENU_ENUM_LABEL_ADD_CONTENT_LIST, "add_content") MSG_HASH(MENU_ENUM_LABEL_CONFIGURATIONS_LIST, diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index f316e556bf..d551f11bd5 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -94,6 +94,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST, "Achievement List" ) + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST_HARDCORE, + "Achievement List (Hardcore)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST, "Scan Content" diff --git a/menu/cbs/menu_cbs_deferred_push.c b/menu/cbs/menu_cbs_deferred_push.c index 3b4f2b2956..bd9f3f8050 100644 --- a/menu/cbs/menu_cbs_deferred_push.c +++ b/menu/cbs/menu_cbs_deferred_push.c @@ -80,6 +80,11 @@ static int deferred_push_achievement_list(menu_displaylist_info_t *info) return deferred_push_dlist(info, DISPLAYLIST_ACHIEVEMENT_LIST); } +static int deferred_push_achievement_list_hardcore(menu_displaylist_info_t *info) +{ + return deferred_push_dlist(info, DISPLAYLIST_ACHIEVEMENT_LIST_HARDCORE); +} + static int deferred_push_rdb_collection(menu_displaylist_info_t *info) { return deferred_push_dlist(info, DISPLAYLIST_PLAYLIST_COLLECTION); @@ -996,6 +1001,9 @@ static int menu_cbs_init_bind_deferred_push_compare_label( case MENU_ENUM_LABEL_ACHIEVEMENT_LIST: BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_achievement_list); break; + case MENU_ENUM_LABEL_ACHIEVEMENT_LIST_HARDCORE: + BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_achievement_list_hardcore); + break; case MENU_ENUM_LABEL_CORE_COUNTERS: BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_counters); break; @@ -1256,6 +1264,9 @@ static int menu_cbs_init_bind_deferred_push_compare_label( case MENU_LABEL_ACHIEVEMENT_LIST: BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_achievement_list); break; + case MENU_LABEL_ACHIEVEMENT_LIST_HARDCORE: + BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_achievement_list_hardcore); + break; case MENU_LABEL_CORE_COUNTERS: BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_counters); break; diff --git a/menu/cbs/menu_cbs_get_value.c b/menu/cbs/menu_cbs_get_value.c index 672c4f0a20..d1aecf4cfd 100644 --- a/menu/cbs/menu_cbs_get_value.c +++ b/menu/cbs/menu_cbs_get_value.c @@ -1714,6 +1714,7 @@ static int menu_cbs_init_bind_get_string_representation_compare_label( case MENU_ENUM_LABEL_CORE_INFORMATION: case MENU_ENUM_LABEL_SYSTEM_INFORMATION: case MENU_ENUM_LABEL_ACHIEVEMENT_LIST: + case MENU_ENUM_LABEL_ACHIEVEMENT_LIST_HARDCORE: case MENU_ENUM_LABEL_SAVE_STATE: case MENU_ENUM_LABEL_LOAD_STATE: BIND_ACTION_GET_VALUE(cbs, @@ -1952,6 +1953,10 @@ int menu_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *cbs, BIND_ACTION_GET_VALUE(cbs, menu_action_setting_disp_set_label_achievement_information); return 0; + case MENU_ENUM_LABEL_ACHIEVEMENT_LIST_HARDCORE: + BIND_ACTION_GET_VALUE(cbs, + menu_action_setting_disp_set_label_achievement_information); + return 0; default: break; } diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 762c5b7388..970424d02c 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3696,6 +3696,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_SYSTEM_INFORMATION: case MENU_ENUM_LABEL_NETWORK_INFORMATION: case MENU_ENUM_LABEL_ACHIEVEMENT_LIST: + case MENU_ENUM_LABEL_ACHIEVEMENT_LIST_HARDCORE: case MENU_ENUM_LABEL_DISK_OPTIONS: case MENU_ENUM_LABEL_SETTINGS: case MENU_ENUM_LABEL_FRONTEND_COUNTERS: diff --git a/menu/cbs/menu_cbs_title.c b/menu/cbs/menu_cbs_title.c index 93a6707896..e8e4ecab1d 100644 --- a/menu/cbs/menu_cbs_title.c +++ b/menu/cbs/menu_cbs_title.c @@ -1285,6 +1285,7 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs, break; case MENU_ENUM_LABEL_MANAGEMENT: case MENU_ENUM_LABEL_ACHIEVEMENT_LIST: + case MENU_ENUM_LABEL_ACHIEVEMENT_LIST_HARDCORE: case MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS: case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PARAMETERS: case MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST: diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 632caea135..b7e075c45c 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1747,6 +1747,8 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb, return xmb->textures.list[XMB_TEXTURE_SHADER_OPTIONS]; case MENU_ENUM_LABEL_ACHIEVEMENT_LIST: return xmb->textures.list[XMB_TEXTURE_ACHIEVEMENT_LIST]; + case MENU_ENUM_LABEL_ACHIEVEMENT_LIST_HARDCORE: + return xmb->textures.list[XMB_TEXTURE_ACHIEVEMENT_LIST]; case MENU_ENUM_LABEL_SAVE_STATE: return xmb->textures.list[XMB_TEXTURE_SAVESTATE]; case MENU_ENUM_LABEL_LOAD_STATE: diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 62ca92c232..4e91881f36 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2739,11 +2739,18 @@ static int menu_displaylist_parse_load_content_settings( #ifdef HAVE_CHEEVOS if(settings->cheevos.enable) + { menu_entries_append_enum(info->list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST), msg_hash_to_str(MENU_ENUM_LABEL_ACHIEVEMENT_LIST), MENU_ENUM_LABEL_ACHIEVEMENT_LIST, MENU_SETTING_ACTION, 0, 0); + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST_HARDCORE), + msg_hash_to_str(MENU_ENUM_LABEL_ACHIEVEMENT_LIST_HARDCORE), + MENU_ENUM_LABEL_ACHIEVEMENT_LIST_HARDCORE, + MENU_SETTING_ACTION, 0, 0); + } #endif } else @@ -4148,6 +4155,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) case DISPLAYLIST_NETWORK_INFO: case DISPLAYLIST_SYSTEM_INFO: case DISPLAYLIST_ACHIEVEMENT_LIST: + case DISPLAYLIST_ACHIEVEMENT_LIST_HARDCORE: case DISPLAYLIST_CORES: case DISPLAYLIST_CORES_DETECTED: case DISPLAYLIST_CORES_UPDATER: @@ -5757,7 +5765,12 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) break; #ifdef HAVE_CHEEVOS case DISPLAYLIST_ACHIEVEMENT_LIST: - cheevos_populate_menu(info); + cheevos_populate_menu(info, false); + info->need_push = true; + info->need_refresh = true; + break; + case DISPLAYLIST_ACHIEVEMENT_LIST_HARDCORE: + cheevos_populate_menu(info, true); info->need_push = true; info->need_refresh = true; break; diff --git a/menu/menu_displaylist.h b/menu/menu_displaylist.h index 9f1a5a7a4c..1adaa7a864 100644 --- a/menu/menu_displaylist.h +++ b/menu/menu_displaylist.h @@ -105,6 +105,7 @@ enum menu_displaylist_ctl_state DISPLAYLIST_NETWORK_INFO, DISPLAYLIST_SYSTEM_INFO, DISPLAYLIST_ACHIEVEMENT_LIST, + DISPLAYLIST_ACHIEVEMENT_LIST_HARDCORE, DISPLAYLIST_USER_BINDS_LIST, DISPLAYLIST_ACCOUNTS_LIST, DISPLAYLIST_DRIVER_SETTINGS_LIST, diff --git a/msg_hash.h b/msg_hash.h index 118dc02816..b66c207967 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -1536,8 +1536,10 @@ enum msg_hash_enums MENU_ENUM_LABEL_VALUE_NETWORK_INFORMATION, MENU_ENUM_LABEL_SYSTEM_INFORMATION, MENU_ENUM_LABEL_ACHIEVEMENT_LIST, + MENU_ENUM_LABEL_ACHIEVEMENT_LIST_HARDCORE, MENU_ENUM_LABEL_VALUE_SYSTEM_INFORMATION, MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST, + MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST_HARDCORE, MENU_ENUM_LABEL_CORE_INFORMATION, MENU_ENUM_LABEL_VALUE_CORE_INFORMATION, MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PARAMETERS, @@ -2153,6 +2155,7 @@ enum msg_hash_enums #define MENU_LABEL_FRONTEND_COUNTERS 0xe5696877U #define MENU_LABEL_CORE_COUNTERS 0x64cc83e0U #define MENU_LABEL_ACHIEVEMENT_LIST 0x7b90fc49U +#define MENU_LABEL_ACHIEVEMENT_LIST_HARDCORE 0x7c632930U #define MENU_LABEL_CORE_INFORMATION 0xb638e0d3U #define MENU_LABEL_CORE_OPTIONS 0xf65e60f9U #define MENU_LABEL_SHADER_OPTIONS 0x1f7d2fc7U