mirror of
https://github.com/libretro/RetroArch
synced 2025-03-06 04:13:52 +00:00
List the current core now
This commit is contained in:
parent
b21b237cdb
commit
508657c410
@ -5900,37 +5900,43 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
|||||||
(void*)menu->deferred_path,
|
(void*)menu->deferred_path,
|
||||||
&cores_names_len, &cores_names_size);
|
&cores_names_len, &cores_names_size);
|
||||||
|
|
||||||
if (!path_is_empty(RARCH_PATH_CORE))
|
if (cores_names_size == 0)
|
||||||
{
|
{
|
||||||
const char *core_name = NULL;
|
if (!path_is_empty(RARCH_PATH_CORE))
|
||||||
struct retro_system_info *system = NULL;
|
{
|
||||||
|
|
||||||
menu_entries_append_enum(info->list,
|
menu_entries_append_enum(info->list,
|
||||||
path_get(RARCH_PATH_CORE),
|
path_get(RARCH_PATH_CORE),
|
||||||
path_get(RARCH_PATH_CORE),
|
path_get(RARCH_PATH_CORE),
|
||||||
MENU_ENUM_LABEL_DETECT_CORE_LIST_OK,
|
MENU_ENUM_LABEL_DETECT_CORE_LIST_OK,
|
||||||
FILE_TYPE_DIRECT_LOAD,
|
FILE_TYPE_DIRECT_LOAD,
|
||||||
0,
|
0,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_GET,
|
{
|
||||||
&system);
|
const char *core_name = NULL;
|
||||||
|
struct retro_system_info *system = NULL;
|
||||||
|
|
||||||
if (system)
|
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_GET,
|
||||||
core_name = system->library_name;
|
&system);
|
||||||
|
|
||||||
if (!string_is_empty(core_name))
|
if (system)
|
||||||
menu_entries_set_alt_at_offset(info->list, 0,
|
core_name = system->library_name;
|
||||||
core_name);
|
|
||||||
}
|
if (!string_is_empty(core_name))
|
||||||
else if (cores_names_size == 0)
|
menu_entries_set_alt_at_offset(info->list, 0,
|
||||||
{
|
core_name);
|
||||||
menu_entries_append_enum(info->list,
|
}
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_CORES_AVAILABLE),
|
}
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_NO_CORES_AVAILABLE),
|
else
|
||||||
MENU_ENUM_LABEL_NO_CORES_AVAILABLE,
|
{
|
||||||
0, 0, 0);
|
menu_entries_append_enum(info->list,
|
||||||
info->download_core = true;
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_CORES_AVAILABLE),
|
||||||
|
msg_hash_to_str(MENU_ENUM_LABEL_NO_CORES_AVAILABLE),
|
||||||
|
MENU_ENUM_LABEL_NO_CORES_AVAILABLE,
|
||||||
|
0, 0, 0);
|
||||||
|
info->download_core = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cores_names_size != 0)
|
if (cores_names_size != 0)
|
||||||
@ -5957,8 +5963,20 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu_entries_set_alt_at_offset(info->list, i,
|
if ( !path_is_empty(RARCH_PATH_CORE) &&
|
||||||
cores_names->elems[i].data);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
string_list_free(cores_paths);
|
string_list_free(cores_paths);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user