mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-12 04:46:39 +00:00
(Achievements) Push empty entry if no achievements found
This commit is contained in:
parent
db74b7cbbc
commit
c9f2ad1b5e
19
cheevos.c
19
cheevos.c
@ -2191,6 +2191,7 @@ void cheevos_populate_menu(void *data)
|
||||
{
|
||||
#ifdef HAVE_MENU
|
||||
unsigned i;
|
||||
unsigned items_found = 0;
|
||||
const cheevo_t *end = NULL;
|
||||
cheevo_t *cheevo = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
@ -2202,9 +2203,12 @@ void cheevos_populate_menu(void *data)
|
||||
for (i = 0; cheevo < end; i++, cheevo++)
|
||||
{
|
||||
if (!cheevo->active)
|
||||
{
|
||||
menu_entries_add_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
}
|
||||
}
|
||||
|
||||
if (settings->cheevos.test_unofficial)
|
||||
@ -2228,9 +2232,12 @@ void cheevos_populate_menu(void *data)
|
||||
for (i = 0; cheevo < end; i++, cheevo++)
|
||||
{
|
||||
if (cheevo->active)
|
||||
{
|
||||
menu_entries_add_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)
|
||||
@ -2242,11 +2249,23 @@ void cheevos_populate_menu(void *data)
|
||||
for (i = cheevos_locals.core.count; cheevo < end; i++, cheevo++)
|
||||
{
|
||||
if (cheevo->active)
|
||||
{
|
||||
menu_entries_add_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (items_found == 0)
|
||||
{
|
||||
menu_entries_add_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ACHIEVEMENTS_TO_DISPLAY),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_NO_ACHIEVEMENTS_TO_DISPLAY),
|
||||
MENU_ENUM_LABEL_NO_ACHIEVEMENTS_TO_DISPLAY,
|
||||
FILE_TYPE_NONE, 0, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1265,6 +1265,8 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg)
|
||||
return "no_performance_counters";
|
||||
case MENU_ENUM_LABEL_NO_ENTRIES_TO_DISPLAY:
|
||||
return "no_entries_to_display";
|
||||
case MENU_ENUM_LABEL_NO_ACHIEVEMENTS_TO_DISPLAY:
|
||||
return "no_achievements_to_display";
|
||||
case MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ACHIEVEMENTS:
|
||||
return "cheevos_unlocked_achievements";
|
||||
case MENU_ENUM_LABEL_CHEEVOS_LOCKED_ACHIEVEMENTS:
|
||||
@ -2551,6 +2553,8 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
|
||||
return "Custom Viewport Height";
|
||||
case MENU_ENUM_LABEL_VALUE_NO_ENTRIES_TO_DISPLAY:
|
||||
return "No entries to display.";
|
||||
case MENU_ENUM_LABEL_VALUE_NO_ACHIEVEMENTS_TO_DISPLAY:
|
||||
return "No achievements to display.";
|
||||
case MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ACHIEVEMENTS:
|
||||
return "Unlocked Achievements:";
|
||||
case MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ACHIEVEMENTS:
|
||||
|
@ -579,6 +579,8 @@ enum msg_hash_enums
|
||||
|
||||
MENU_ENUM_LABEL_MENU_THROTTLE_FRAMERATE,
|
||||
|
||||
MENU_ENUM_LABEL_NO_ACHIEVEMENTS_TO_DISPLAY,
|
||||
MENU_ENUM_LABEL_VALUE_NO_ACHIEVEMENTS_TO_DISPLAY,
|
||||
|
||||
MENU_ENUM_LABEL_NO_ENTRIES_TO_DISPLAY,
|
||||
MENU_ENUM_LABEL_VALUE_NO_ENTRIES_TO_DISPLAY,
|
||||
|
Loading…
Reference in New Issue
Block a user