List the current core now

This commit is contained in:
twinaphex 2016-12-12 18:53:55 +01:00
parent b21b237cdb
commit 508657c410

View File

@ -5900,10 +5900,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
(void*)menu->deferred_path,
&cores_names_len, &cores_names_size);
if (cores_names_size == 0)
{
if (!path_is_empty(RARCH_PATH_CORE))
{
const char *core_name = NULL;
struct retro_system_info *system = NULL;
menu_entries_append_enum(info->list,
path_get(RARCH_PATH_CORE),
@ -5913,6 +5913,10 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
0,
0);
{
const char *core_name = NULL;
struct retro_system_info *system = NULL;
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_GET,
&system);
@ -5923,7 +5927,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
menu_entries_set_alt_at_offset(info->list, 0,
core_name);
}
else if (cores_names_size == 0)
}
else
{
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_CORES_AVAILABLE),
@ -5932,6 +5937,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
0, 0, 0);
info->download_core = true;
}
}
if (cores_names_size != 0)
{
@ -5957,6 +5963,18 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
break;
}
if ( !path_is_empty(RARCH_PATH_CORE) &&
string_is_equal(cores_paths->elems[i].data, path_get(RARCH_PATH_CORE)))
{
char newstring[1024];
newstring[0] = '\0';
snprintf(newstring, sizeof(newstring), "%s (Current core)", cores_names->elems[i].data);
menu_entries_set_alt_at_offset(info->list, i,
newstring);
}
else
menu_entries_set_alt_at_offset(info->list, i,
cores_names->elems[i].data);
}